scb-wc-test 0.1.144 → 0.1.145

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,55 +1,64 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../../vendor/vendor-material.js","../../vendor/vendor.js"])))=>i.map(i=>d[i]);
2
- import{_ as h}from"../../vendor/preload-helper.js";import{a as g,n as a,i as m,x as r,t as f}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";(function(){try{var t=typeof globalThis<"u"?globalThis:window;if(!t.__scb_ce_guard_installed__){t.__scb_ce_guard_installed__=!0;var e=customElements.define.bind(customElements);customElements.define=function(i,l,n){try{customElements.get(i)||e(i,l,n)}catch(c){var d=String(c||"");if(d.indexOf("already been used")===-1&&d.indexOf("NotSupportedError")===-1)throw c}}}}catch{}})();var v=Object.defineProperty,y=Object.getOwnPropertyDescriptor,b=t=>{throw TypeError(t)},s=(t,e,i,l)=>{for(var n=l>1?void 0:l?y(e,i):e,d=t.length-1,c;d>=0;d--)(c=t[d])&&(n=(l?c(e,i,n):c(n))||n);return l&&n&&v(e,i,n),n},A=(t,e,i)=>e.has(t)||b("Cannot "+i),$=(t,e,i)=>e.has(t)?b("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),p=(t,e,i)=>(A(t,e,"access private method"),i),_,u;let o=class extends m{constructor(){super(...arguments),$(this,_),this.icon="home",this.tooltip="",this.ariaLabel="",this.variant="standard",this.toggle=!1,this.selected=!1,this.toggleofficon="add",this.toggleonicon="remove",this.disabled=!1,this.spacing="",this.spacingTop="",this.spacingBottom="",this.__loadedVariants=new Set,this.__iconLoaded=!1,this.__lastMdHost=null,this.__onInnerChange=()=>{const e=!!this.__getMdHost()?.selected;this.toggle&&(this.selected=e),this.dispatchEvent(new CustomEvent("change",{detail:{selected:e},bubbles:!0,composed:!0}))}}async firstUpdated(){await this.__ensureDepsLoaded(),await this.updateComplete,this.__attachChangeListener(),this.__syncTitleAndAria(),p(this,_,u).call(this)}updated(t){if(super.updated(t),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom"))&&p(this,_,u).call(this),t.has("variant")){this.__ensureDepsLoaded().then(()=>{queueMicrotask(()=>{this.__attachChangeListener(),this.__syncTitleAndAria()})});return}(t.has("toggle")||t.has("icon")||t.has("toggleofficon")||t.has("toggleonicon")||t.has("selected")||t.has("disabled")||t.has("tooltip")||t.has("ariaLabel"))&&queueMicrotask(()=>{this.__attachChangeListener(),this.__syncTitleAndAria()})}disconnectedCallback(){this.__lastMdHost?.removeEventListener?.("change",this.__onInnerChange),this.__lastMdHost=null,super.disconnectedCallback()}async __ensureDepsLoaded(){if(!this.__loadedVariants.has(this.variant)){switch(this.variant){case"filled":await h(()=>import("../../vendor/vendor-material.js").then(t=>t.f),__vite__mapDeps([0,1]),import.meta.url);break;case"outlined":await h(()=>import("../../vendor/vendor-material.js").then(t=>t.o),__vite__mapDeps([0,1]),import.meta.url);break;case"filled-tonal":await h(()=>import("../../vendor/vendor-material.js").then(t=>t.c),__vite__mapDeps([0,1]),import.meta.url);break;default:await h(()=>import("../../vendor/vendor-material.js").then(t=>t.d),__vite__mapDeps([0,1]),import.meta.url);break}this.__loadedVariants.add(this.variant)}this.__iconLoaded||(await h(()=>import("../../vendor/vendor-material.js").then(t=>t.i),__vite__mapDeps([0,1]),import.meta.url),this.__iconLoaded=!0)}__getMdHost(){return this.renderRoot.querySelector("md-filled-icon-button, md-outlined-icon-button, md-filled-tonal-icon-button, md-icon-button")}__attachChangeListener(){const t=this.__getMdHost();t&&t!==this.__lastMdHost&&(this.__lastMdHost?.removeEventListener?.("change",this.__onInnerChange),t.addEventListener("change",this.__onInnerChange),this.__lastMdHost=t),this.toggle&&t&&"selected"in t&&(t.selected=this.selected)}__syncTitleAndAria(){const t=this.__getMdHost();if(!t)return;const e=(this.tooltip||this.getAttribute("title")||"").trim(),i=(this.ariaLabel||this.getAttribute("aria-label")||"").trim(),l=this.getAttribute("aria-controls"),n=this.getAttribute("aria-expanded");this.tooltip&&this.setAttribute("title",e);const d=i||e||this.icon.trim()||void 0;d?t.setAttribute("aria-label",d):t.removeAttribute("aria-label"),e?t.setAttribute("title",e):t.removeAttribute("title"),l!==null?t.setAttribute("aria-controls",l):t.removeAttribute("aria-controls"),n!==null?t.setAttribute("aria-expanded",n):t.removeAttribute("aria-expanded")}mapSpacingToken(t){if(!t)return;const e=String(t).trim();if(e)return/^\d+$/.test(e)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(e,10)))})`:e}__renderToggleIcons(){return r`
2
+ import{_ as p}from"../../vendor/preload-helper.js";import{a as f,n,i as m,x as l,E as i,t as y}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";(function(){try{var t=typeof globalThis<"u"?globalThis:window;if(!t.__scb_ce_guard_installed__){t.__scb_ce_guard_installed__=!0;var e=customElements.define.bind(customElements);customElements.define=function(s,d,a){try{customElements.get(s)||e(s,d,a)}catch(h){var c=String(h||"");if(c.indexOf("already been used")===-1&&c.indexOf("NotSupportedError")===-1)throw h}}}}catch{}})();var v=Object.defineProperty,$=Object.getOwnPropertyDescriptor,b=t=>{throw TypeError(t)},r=(t,e,s,d)=>{for(var a=d>1?void 0:d?$(e,s):e,c=t.length-1,h;c>=0;c--)(h=t[c])&&(a=(d?h(e,s,a):h(a))||a);return d&&a&&v(e,s,a),a},A=(t,e,s)=>e.has(t)||b("Cannot "+s),S=(t,e,s)=>e.has(t)?b("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),g=(t,e,s)=>(A(t,e,"access private method"),s),_,u;let o=class extends m{constructor(){super(...arguments),S(this,_),this.icon="home",this.tooltip="",this.ariaLabel="",this.variant="standard",this.toggle=!1,this.selected=!1,this.toggleofficon="add",this.toggleonicon="remove",this.disabled=!1,this.spacing="",this.spacingTop="",this.spacingBottom="",this.href="",this.target="",this.rel="",this.__loadedVariants=new Set,this.__iconLoaded=!1,this.__lastMdHost=null,this.__onInnerChange=()=>{const e=!!this.__getMdHost()?.selected;this.toggle&&(this.selected=e),this.dispatchEvent(new CustomEvent("change",{detail:{selected:e},bubbles:!0,composed:!0}))}}async firstUpdated(){await this.__ensureDepsLoaded(),await this.updateComplete,this.__attachChangeListener(),this.__syncTitleAndAria(),g(this,_,u).call(this)}updated(t){if(super.updated(t),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom"))&&g(this,_,u).call(this),t.has("variant")){this.__ensureDepsLoaded().then(()=>{queueMicrotask(()=>{this.__attachChangeListener(),this.__syncTitleAndAria()})});return}(t.has("toggle")||t.has("icon")||t.has("toggleofficon")||t.has("toggleonicon")||t.has("selected")||t.has("disabled")||t.has("tooltip")||t.has("ariaLabel"))&&queueMicrotask(()=>{this.__attachChangeListener(),this.__syncTitleAndAria()})}disconnectedCallback(){this.__lastMdHost?.removeEventListener?.("change",this.__onInnerChange),this.__lastMdHost=null,super.disconnectedCallback()}async __ensureDepsLoaded(){if(!this.__loadedVariants.has(this.variant)){switch(this.variant){case"filled":await p(()=>import("../../vendor/vendor-material.js").then(t=>t.f),__vite__mapDeps([0,1]),import.meta.url);break;case"outlined":await p(()=>import("../../vendor/vendor-material.js").then(t=>t.o),__vite__mapDeps([0,1]),import.meta.url);break;case"filled-tonal":await p(()=>import("../../vendor/vendor-material.js").then(t=>t.c),__vite__mapDeps([0,1]),import.meta.url);break;default:await p(()=>import("../../vendor/vendor-material.js").then(t=>t.d),__vite__mapDeps([0,1]),import.meta.url);break}this.__loadedVariants.add(this.variant)}this.__iconLoaded||(await p(()=>import("../../vendor/vendor-material.js").then(t=>t.i),__vite__mapDeps([0,1]),import.meta.url),this.__iconLoaded=!0)}__getMdHost(){return this.renderRoot.querySelector("md-filled-icon-button, md-outlined-icon-button, md-filled-tonal-icon-button, md-icon-button")}__attachChangeListener(){const t=this.__getMdHost();t&&t!==this.__lastMdHost&&(this.__lastMdHost?.removeEventListener?.("change",this.__onInnerChange),t.addEventListener("change",this.__onInnerChange),this.__lastMdHost=t),this.toggle&&t&&"selected"in t&&(t.selected=this.selected)}__syncTitleAndAria(){const t=this.__getMdHost();if(!t)return;const e=(this.tooltip||this.getAttribute("title")||"").trim(),s=(this.ariaLabel||this.getAttribute("aria-label")||"").trim(),d=this.getAttribute("aria-controls"),a=this.getAttribute("aria-expanded");this.tooltip&&this.setAttribute("title",e);const c=s||e||this.icon.trim()||void 0;c?t.setAttribute("aria-label",c):t.removeAttribute("aria-label"),e?t.setAttribute("title",e):t.removeAttribute("title"),d!==null?t.setAttribute("aria-controls",d):t.removeAttribute("aria-controls"),a!==null?t.setAttribute("aria-expanded",a):t.removeAttribute("aria-expanded")}mapSpacingToken(t){if(!t)return;const e=String(t).trim();if(e)return/^\d+$/.test(e)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(e,10)))})`:e}__renderToggleIcons(){return l`
3
3
  <md-icon aria-hidden="true">${this.toggleofficon}</md-icon>
4
4
  <md-icon slot="selected" aria-hidden="true">${this.toggleonicon}</md-icon>
5
- `}__renderSingleIcon(){return r`<md-icon aria-hidden="true">${this.icon}</md-icon>`}__renderMd(){const t=this.toggle?this.__renderToggleIcons():this.__renderSingleIcon();if(this.toggle)switch(this.variant){case"filled":return r`
5
+ `}__renderSingleIcon(){return l`<md-icon aria-hidden="true">${this.icon}</md-icon>`}__renderMd(){const t=this.toggle?this.__renderToggleIcons():this.__renderSingleIcon();if(this.toggle)switch(this.variant){case"filled":return l`
6
6
  <md-filled-icon-button
7
7
  toggle
8
8
  ?selected=${this.selected}
9
9
  ?disabled=${this.disabled}
10
+ href=${this.href||i}
11
+ target=${this.target||i}
12
+ rel=${this.rel||i}
10
13
  >
11
14
  ${t}
12
15
  </md-filled-icon-button>
13
- `;case"outlined":return r`
16
+ `;case"outlined":return l`
14
17
  <md-outlined-icon-button
15
18
  toggle
16
19
  ?selected=${this.selected}
17
20
  ?disabled=${this.disabled}
21
+ href=${this.href||i}
22
+ target=${this.target||i}
23
+ rel=${this.rel||i}
18
24
  >
19
25
  ${t}
20
26
  </md-outlined-icon-button>
21
- `;case"filled-tonal":return r`
27
+ `;case"filled-tonal":return l`
22
28
  <md-filled-tonal-icon-button
23
29
  toggle
24
30
  ?selected=${this.selected}
25
31
  ?disabled=${this.disabled}
32
+ href=${this.href||i}
33
+ target=${this.target||i}
34
+ rel=${this.rel||i}
26
35
  >
27
36
  ${t}
28
37
  </md-filled-tonal-icon-button>
29
- `;default:return r`
30
- <md-icon-button toggle ?selected=${this.selected} ?disabled=${this.disabled}>
38
+ `;default:return l`
39
+ <md-icon-button toggle ?selected=${this.selected} ?disabled=${this.disabled} href=${this.href||i} target=${this.target||i} rel=${this.rel||i}>
31
40
  ${t}
32
41
  </md-icon-button>
33
- `}switch(this.variant){case"filled":return r`
34
- <md-filled-icon-button ?disabled=${this.disabled}>
42
+ `}switch(this.variant){case"filled":return l`
43
+ <md-filled-icon-button ?disabled=${this.disabled} href=${this.href||i} target=${this.target||i} rel=${this.rel||i}>
35
44
  ${t}
36
45
  </md-filled-icon-button>
37
- `;case"outlined":return r`
38
- <md-outlined-icon-button ?disabled=${this.disabled}>
46
+ `;case"outlined":return l`
47
+ <md-outlined-icon-button ?disabled=${this.disabled} href=${this.href||i} target=${this.target||i} rel=${this.rel||i}>
39
48
  ${t}
40
49
  </md-outlined-icon-button>
41
- `;case"filled-tonal":return r`
42
- <md-filled-tonal-icon-button ?disabled=${this.disabled}>
50
+ `;case"filled-tonal":return l`
51
+ <md-filled-tonal-icon-button ?disabled=${this.disabled} href=${this.href||i} target=${this.target||i} rel=${this.rel||i}>
43
52
  ${t}
44
53
  </md-filled-tonal-icon-button>
45
- `;default:return r`
46
- <md-icon-button ?disabled=${this.disabled}>
54
+ `;default:return l`
55
+ <md-icon-button ?disabled=${this.disabled} href=${this.href||i} target=${this.target||i} rel=${this.rel||i}>
47
56
  ${t}
48
57
  </md-icon-button>
49
- `}}render(){return this.__renderMd()}};_=new WeakSet;u=function(){const t=this.mapSpacingToken(this.spacing),e=this.mapSpacingToken(this.spacingTop)??t,i=this.mapSpacingToken(this.spacingBottom)??t;e?this.style.setProperty("--scb-icon-button-spacing-block-start",e):this.style.removeProperty("--scb-icon-button-spacing-block-start"),i?this.style.setProperty("--scb-icon-button-spacing-block-end",i):this.style.removeProperty("--scb-icon-button-spacing-block-end")};o.styles=g`
58
+ `}}render(){return this.__renderMd()}};_=new WeakSet;u=function(){const t=this.mapSpacingToken(this.spacing),e=this.mapSpacingToken(this.spacingTop)??t,s=this.mapSpacingToken(this.spacingBottom)??t;e?this.style.setProperty("--scb-icon-button-spacing-block-start",e):this.style.removeProperty("--scb-icon-button-spacing-block-start"),s?this.style.setProperty("--scb-icon-button-spacing-block-end",s):this.style.removeProperty("--scb-icon-button-spacing-block-end")};o.styles=f`
50
59
  :host {
51
60
  display: inline-flex;
52
61
  margin-block-start: var(--scb-icon-button-spacing-block-start, 0);
53
62
  margin-block-end: var(--scb-icon-button-spacing-block-end, 0);
54
63
  }
55
- `;s([a({type:String})],o.prototype,"icon",2);s([a({type:String})],o.prototype,"tooltip",2);s([a({type:String,attribute:"aria-label"})],o.prototype,"ariaLabel",2);s([a({type:String})],o.prototype,"variant",2);s([a({type:Boolean,reflect:!0})],o.prototype,"toggle",2);s([a({type:Boolean,reflect:!0})],o.prototype,"selected",2);s([a({type:String})],o.prototype,"toggleofficon",2);s([a({type:String})],o.prototype,"toggleonicon",2);s([a({type:Boolean,reflect:!0})],o.prototype,"disabled",2);s([a({type:String,reflect:!0})],o.prototype,"spacing",2);s([a({type:String,attribute:"spacing-top",reflect:!0})],o.prototype,"spacingTop",2);s([a({type:String,attribute:"spacing-bottom",reflect:!0})],o.prototype,"spacingBottom",2);o=s([f("scb-icon-button")],o);export{o as ScbIconButton};
64
+ `;r([n({type:String})],o.prototype,"icon",2);r([n({type:String})],o.prototype,"tooltip",2);r([n({type:String,attribute:"aria-label"})],o.prototype,"ariaLabel",2);r([n({type:String})],o.prototype,"variant",2);r([n({type:Boolean,reflect:!0})],o.prototype,"toggle",2);r([n({type:Boolean,reflect:!0})],o.prototype,"selected",2);r([n({type:String})],o.prototype,"toggleofficon",2);r([n({type:String})],o.prototype,"toggleonicon",2);r([n({type:Boolean,reflect:!0})],o.prototype,"disabled",2);r([n({type:String,reflect:!0})],o.prototype,"spacing",2);r([n({type:String,attribute:"spacing-top",reflect:!0})],o.prototype,"spacingTop",2);r([n({type:String,attribute:"spacing-bottom",reflect:!0})],o.prototype,"spacingBottom",2);r([n({type:String})],o.prototype,"href",2);r([n({type:String})],o.prototype,"target",2);r([n({type:String})],o.prototype,"rel",2);o=r([y("scb-icon-button")],o);export{o as ScbIconButton};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scb-wc-test",
3
- "version": "0.1.144",
3
+ "version": "0.1.145",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -365,5 +365,5 @@
365
365
  },
366
366
  "./mvc/*": "./mvc/*"
367
367
  },
368
- "buildHash": "5930BC5AB9243AFF27B8A09412CBB364B8EA8415FC7F7657D4B98B5CEE77CE32"
368
+ "buildHash": "221318C2A5D8B94CD2D287092B0EF79321232467E0A7A7BA26B3CFFF69A1363B"
369
369
  }
@@ -26,6 +26,9 @@ export declare class ScbIconButton extends LitElement {
26
26
  spacingTop: string;
27
27
  /** Nederkantens avstånd. Om satt går före spacing. 0–14 mappar till var(--spacing-N), annars CSS-värde. */
28
28
  spacingBottom: string;
29
+ href: string;
30
+ target: string;
31
+ rel: string;
29
32
  private __loadedVariants;
30
33
  private __iconLoaded;
31
34
  private __lastMdHost;
@@ -1,16 +1,16 @@
1
- import { css as g, LitElement as _, html as r } from "lit";
1
+ import { css as _, LitElement as f, html as l, nothing as i } from "lit";
2
2
  import { property as n, customElement as m } from "lit/decorators.js";
3
3
  import "@material/web/icon/icon.js";
4
- var f = Object.defineProperty, y = Object.getOwnPropertyDescriptor, b = (t) => {
4
+ var y = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, b = (t) => {
5
5
  throw TypeError(t);
6
- }, o = (t, e, i, l) => {
7
- for (var a = l > 1 ? void 0 : l ? y(e, i) : e, d = t.length - 1, h; d >= 0; d--)
8
- (h = t[d]) && (a = (l ? h(e, i, a) : h(a)) || a);
9
- return l && a && f(e, i, a), a;
10
- }, v = (t, e, i) => e.has(t) || b("Cannot " + i), $ = (t, e, i) => e.has(t) ? b("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), u = (t, e, i) => (v(t, e, "access private method"), i), c, p;
11
- let s = class extends _ {
6
+ }, r = (t, e, s, d) => {
7
+ for (var a = d > 1 ? void 0 : d ? $(e, s) : e, c = t.length - 1, p; c >= 0; c--)
8
+ (p = t[c]) && (a = (d ? p(e, s, a) : p(a)) || a);
9
+ return d && a && y(e, s, a), a;
10
+ }, v = (t, e, s) => e.has(t) || b("Cannot " + s), S = (t, e, s) => e.has(t) ? b("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), u = (t, e, s) => (v(t, e, "access private method"), s), h, g;
11
+ let o = class extends f {
12
12
  constructor() {
13
- super(...arguments), $(this, c), this.icon = "home", this.tooltip = "", this.ariaLabel = "", this.variant = "standard", this.toggle = !1, this.selected = !1, this.toggleofficon = "add", this.toggleonicon = "remove", this.disabled = !1, this.spacing = "", this.spacingTop = "", this.spacingBottom = "", this.__loadedVariants = /* @__PURE__ */ new Set(), this.__iconLoaded = !1, this.__lastMdHost = null, this.__onInnerChange = () => {
13
+ super(...arguments), S(this, h), this.icon = "home", this.tooltip = "", this.ariaLabel = "", this.variant = "standard", this.toggle = !1, this.selected = !1, this.toggleofficon = "add", this.toggleonicon = "remove", this.disabled = !1, this.spacing = "", this.spacingTop = "", this.spacingBottom = "", this.href = "", this.target = "", this.rel = "", this.__loadedVariants = /* @__PURE__ */ new Set(), this.__iconLoaded = !1, this.__lastMdHost = null, this.__onInnerChange = () => {
14
14
  const t = this.__getMdHost(), e = !!(t != null && t.selected);
15
15
  this.toggle && (this.selected = e), this.dispatchEvent(
16
16
  new CustomEvent("change", {
@@ -22,10 +22,10 @@ let s = class extends _ {
22
22
  };
23
23
  }
24
24
  async firstUpdated() {
25
- await this.__ensureDepsLoaded(), await this.updateComplete, this.__attachChangeListener(), this.__syncTitleAndAria(), u(this, c, p).call(this);
25
+ await this.__ensureDepsLoaded(), await this.updateComplete, this.__attachChangeListener(), this.__syncTitleAndAria(), u(this, h, g).call(this);
26
26
  }
27
27
  updated(t) {
28
- if (super.updated(t), (t.has("spacing") || t.has("spacingTop") || t.has("spacingBottom")) && u(this, c, p).call(this), t.has("variant")) {
28
+ if (super.updated(t), (t.has("spacing") || t.has("spacingTop") || t.has("spacingBottom")) && u(this, h, g).call(this), t.has("variant")) {
29
29
  this.__ensureDepsLoaded().then(() => {
30
30
  queueMicrotask(() => {
31
31
  this.__attachChangeListener(), this.__syncTitleAndAria();
@@ -69,9 +69,9 @@ let s = class extends _ {
69
69
  }
70
70
  /** Koppla change-event från md-* samt spegla selected. */
71
71
  __attachChangeListener() {
72
- var e, i;
72
+ var e, s;
73
73
  const t = this.__getMdHost();
74
- t && t !== this.__lastMdHost && ((i = (e = this.__lastMdHost) == null ? void 0 : e.removeEventListener) == null || i.call(e, "change", this.__onInnerChange), t.addEventListener("change", this.__onInnerChange), this.__lastMdHost = t), this.toggle && t && "selected" in t && (t.selected = this.selected);
74
+ t && t !== this.__lastMdHost && ((s = (e = this.__lastMdHost) == null ? void 0 : e.removeEventListener) == null || s.call(e, "change", this.__onInnerChange), t.addEventListener("change", this.__onInnerChange), this.__lastMdHost = t), this.toggle && t && "selected" in t && (t.selected = this.selected);
75
75
  }
76
76
  /**
77
77
  * Synkar native title och aria-* mellan host och md-*.
@@ -79,10 +79,10 @@ let s = class extends _ {
79
79
  __syncTitleAndAria() {
80
80
  const t = this.__getMdHost();
81
81
  if (!t) return;
82
- const e = (this.tooltip || this.getAttribute("title") || "").trim(), i = (this.ariaLabel || this.getAttribute("aria-label") || "").trim(), l = this.getAttribute("aria-controls"), a = this.getAttribute("aria-expanded");
82
+ const e = (this.tooltip || this.getAttribute("title") || "").trim(), s = (this.ariaLabel || this.getAttribute("aria-label") || "").trim(), d = this.getAttribute("aria-controls"), a = this.getAttribute("aria-expanded");
83
83
  this.tooltip && this.setAttribute("title", e);
84
- const d = i || e || this.icon.trim() || void 0;
85
- d ? t.setAttribute("aria-label", d) : t.removeAttribute("aria-label"), e ? t.setAttribute("title", e) : t.removeAttribute("title"), l !== null ? t.setAttribute("aria-controls", l) : t.removeAttribute("aria-controls"), a !== null ? t.setAttribute("aria-expanded", a) : t.removeAttribute("aria-expanded");
84
+ const c = s || e || this.icon.trim() || void 0;
85
+ c ? t.setAttribute("aria-label", c) : t.removeAttribute("aria-label"), e ? t.setAttribute("title", e) : t.removeAttribute("title"), d !== null ? t.setAttribute("aria-controls", d) : t.removeAttribute("aria-controls"), a !== null ? t.setAttribute("aria-expanded", a) : t.removeAttribute("aria-expanded");
86
86
  }
87
87
  mapSpacingToken(t) {
88
88
  if (!t) return;
@@ -91,77 +91,86 @@ let s = class extends _ {
91
91
  return /^\d+$/.test(e) ? `var(--spacing-${Math.max(0, Math.min(14, parseInt(e, 10)))})` : e;
92
92
  }
93
93
  __renderToggleIcons() {
94
- return r`
94
+ return l`
95
95
  <md-icon aria-hidden="true">${this.toggleofficon}</md-icon>
96
96
  <md-icon slot="selected" aria-hidden="true">${this.toggleonicon}</md-icon>
97
97
  `;
98
98
  }
99
99
  __renderSingleIcon() {
100
- return r`<md-icon aria-hidden="true">${this.icon}</md-icon>`;
100
+ return l`<md-icon aria-hidden="true">${this.icon}</md-icon>`;
101
101
  }
102
102
  __renderMd() {
103
103
  const t = this.toggle ? this.__renderToggleIcons() : this.__renderSingleIcon();
104
104
  if (this.toggle)
105
105
  switch (this.variant) {
106
106
  case "filled":
107
- return r`
107
+ return l`
108
108
  <md-filled-icon-button
109
109
  toggle
110
110
  ?selected=${this.selected}
111
111
  ?disabled=${this.disabled}
112
+ href=${this.href || i}
113
+ target=${this.target || i}
114
+ rel=${this.rel || i}
112
115
  >
113
116
  ${t}
114
117
  </md-filled-icon-button>
115
118
  `;
116
119
  case "outlined":
117
- return r`
120
+ return l`
118
121
  <md-outlined-icon-button
119
122
  toggle
120
123
  ?selected=${this.selected}
121
124
  ?disabled=${this.disabled}
125
+ href=${this.href || i}
126
+ target=${this.target || i}
127
+ rel=${this.rel || i}
122
128
  >
123
129
  ${t}
124
130
  </md-outlined-icon-button>
125
131
  `;
126
132
  case "filled-tonal":
127
- return r`
133
+ return l`
128
134
  <md-filled-tonal-icon-button
129
135
  toggle
130
136
  ?selected=${this.selected}
131
137
  ?disabled=${this.disabled}
138
+ href=${this.href || i}
139
+ target=${this.target || i}
140
+ rel=${this.rel || i}
132
141
  >
133
142
  ${t}
134
143
  </md-filled-tonal-icon-button>
135
144
  `;
136
145
  default:
137
- return r`
138
- <md-icon-button toggle ?selected=${this.selected} ?disabled=${this.disabled}>
146
+ return l`
147
+ <md-icon-button toggle ?selected=${this.selected} ?disabled=${this.disabled} href=${this.href || i} target=${this.target || i} rel=${this.rel || i}>
139
148
  ${t}
140
149
  </md-icon-button>
141
150
  `;
142
151
  }
143
152
  switch (this.variant) {
144
153
  case "filled":
145
- return r`
146
- <md-filled-icon-button ?disabled=${this.disabled}>
154
+ return l`
155
+ <md-filled-icon-button ?disabled=${this.disabled} href=${this.href || i} target=${this.target || i} rel=${this.rel || i}>
147
156
  ${t}
148
157
  </md-filled-icon-button>
149
158
  `;
150
159
  case "outlined":
151
- return r`
152
- <md-outlined-icon-button ?disabled=${this.disabled}>
160
+ return l`
161
+ <md-outlined-icon-button ?disabled=${this.disabled} href=${this.href || i} target=${this.target || i} rel=${this.rel || i}>
153
162
  ${t}
154
163
  </md-outlined-icon-button>
155
164
  `;
156
165
  case "filled-tonal":
157
- return r`
158
- <md-filled-tonal-icon-button ?disabled=${this.disabled}>
166
+ return l`
167
+ <md-filled-tonal-icon-button ?disabled=${this.disabled} href=${this.href || i} target=${this.target || i} rel=${this.rel || i}>
159
168
  ${t}
160
169
  </md-filled-tonal-icon-button>
161
170
  `;
162
171
  default:
163
- return r`
164
- <md-icon-button ?disabled=${this.disabled}>
172
+ return l`
173
+ <md-icon-button ?disabled=${this.disabled} href=${this.href || i} target=${this.target || i} rel=${this.rel || i}>
165
174
  ${t}
166
175
  </md-icon-button>
167
176
  `;
@@ -171,57 +180,66 @@ let s = class extends _ {
171
180
  return this.__renderMd();
172
181
  }
173
182
  };
174
- c = /* @__PURE__ */ new WeakSet();
175
- p = function() {
176
- const t = this.mapSpacingToken(this.spacing), e = this.mapSpacingToken(this.spacingTop) ?? t, i = this.mapSpacingToken(this.spacingBottom) ?? t;
177
- e ? this.style.setProperty("--scb-icon-button-spacing-block-start", e) : this.style.removeProperty("--scb-icon-button-spacing-block-start"), i ? this.style.setProperty("--scb-icon-button-spacing-block-end", i) : this.style.removeProperty("--scb-icon-button-spacing-block-end");
183
+ h = /* @__PURE__ */ new WeakSet();
184
+ g = function() {
185
+ const t = this.mapSpacingToken(this.spacing), e = this.mapSpacingToken(this.spacingTop) ?? t, s = this.mapSpacingToken(this.spacingBottom) ?? t;
186
+ e ? this.style.setProperty("--scb-icon-button-spacing-block-start", e) : this.style.removeProperty("--scb-icon-button-spacing-block-start"), s ? this.style.setProperty("--scb-icon-button-spacing-block-end", s) : this.style.removeProperty("--scb-icon-button-spacing-block-end");
178
187
  };
179
- s.styles = g`
188
+ o.styles = _`
180
189
  :host {
181
190
  display: inline-flex;
182
191
  margin-block-start: var(--scb-icon-button-spacing-block-start, 0);
183
192
  margin-block-end: var(--scb-icon-button-spacing-block-end, 0);
184
193
  }
185
194
  `;
186
- o([
195
+ r([
187
196
  n({ type: String })
188
- ], s.prototype, "icon", 2);
189
- o([
197
+ ], o.prototype, "icon", 2);
198
+ r([
190
199
  n({ type: String })
191
- ], s.prototype, "tooltip", 2);
192
- o([
200
+ ], o.prototype, "tooltip", 2);
201
+ r([
193
202
  n({ type: String, attribute: "aria-label" })
194
- ], s.prototype, "ariaLabel", 2);
195
- o([
203
+ ], o.prototype, "ariaLabel", 2);
204
+ r([
196
205
  n({ type: String })
197
- ], s.prototype, "variant", 2);
198
- o([
206
+ ], o.prototype, "variant", 2);
207
+ r([
199
208
  n({ type: Boolean, reflect: !0 })
200
- ], s.prototype, "toggle", 2);
201
- o([
209
+ ], o.prototype, "toggle", 2);
210
+ r([
202
211
  n({ type: Boolean, reflect: !0 })
203
- ], s.prototype, "selected", 2);
204
- o([
212
+ ], o.prototype, "selected", 2);
213
+ r([
205
214
  n({ type: String })
206
- ], s.prototype, "toggleofficon", 2);
207
- o([
215
+ ], o.prototype, "toggleofficon", 2);
216
+ r([
208
217
  n({ type: String })
209
- ], s.prototype, "toggleonicon", 2);
210
- o([
218
+ ], o.prototype, "toggleonicon", 2);
219
+ r([
211
220
  n({ type: Boolean, reflect: !0 })
212
- ], s.prototype, "disabled", 2);
213
- o([
221
+ ], o.prototype, "disabled", 2);
222
+ r([
214
223
  n({ type: String, reflect: !0 })
215
- ], s.prototype, "spacing", 2);
216
- o([
224
+ ], o.prototype, "spacing", 2);
225
+ r([
217
226
  n({ type: String, attribute: "spacing-top", reflect: !0 })
218
- ], s.prototype, "spacingTop", 2);
219
- o([
227
+ ], o.prototype, "spacingTop", 2);
228
+ r([
220
229
  n({ type: String, attribute: "spacing-bottom", reflect: !0 })
221
- ], s.prototype, "spacingBottom", 2);
222
- s = o([
230
+ ], o.prototype, "spacingBottom", 2);
231
+ r([
232
+ n({ type: String })
233
+ ], o.prototype, "href", 2);
234
+ r([
235
+ n({ type: String })
236
+ ], o.prototype, "target", 2);
237
+ r([
238
+ n({ type: String })
239
+ ], o.prototype, "rel", 2);
240
+ o = r([
223
241
  m("scb-icon-button")
224
- ], s);
242
+ ], o);
225
243
  export {
226
- s as ScbIconButton
244
+ o as ScbIconButton
227
245
  };