scb-wc-test 0.1.347 → 0.1.349
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.
- package/mvc/components/scb-list/scb-list-item.js +20 -15
- package/package.json +2 -2
- package/scb-list/scb-list-item.d.ts +2 -0
- package/scb-list/scb-list-item.js +72 -41
- package/scb-wc-test.bundle.js +409 -404
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../../vendor/vendor-material.js","../../vendor/vendor.js","../scb-checkbox/scb-checkbox.js","../scb-checkbox/scb-checkbox-group.js","../scb-switch/scb-switch.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as
|
|
2
|
+
import{_ as w}from"../../vendor/preload-helper.js";import{n as s,t as T,i as W,a as z,E as n,x as l}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 i=customElements.define.bind(customElements);customElements.define=function(e,d,c){try{customElements.get(e)||i(e,d,c)}catch(h){var o=String(h||"");if(o.indexOf("already been used")===-1&&o.indexOf("NotSupportedError")===-1)throw h}}}}catch{}})();var C=Object.defineProperty,D=Object.getOwnPropertyDescriptor,E=t=>{throw TypeError(t)},r=(t,i,e,d)=>{for(var c=d>1?void 0:d?D(i,e):i,o=t.length-1,h;o>=0;o--)(h=t[o])&&(c=(d?h(i,e,c):h(c))||c);return d&&c&&C(i,e,c),c},V=(t,i,e)=>i.has(t)||E("Cannot "+e),u=(t,i,e)=>(V(t,i,"read from private field"),e?e.call(t):i.get(t)),g=(t,i,e)=>i.has(t)?E("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(t):i.set(t,e),_=(t,i,e,d)=>(V(t,i,"write to private field"),i.set(t,e),e),f=(t,i,e)=>(V(t,i,"access private method"),e),y,b,m,v,S,x,k,$;let a=class extends W{constructor(){super(...arguments),g(this,v),this.type="text",this.href="",this.itemHref="",this.target="",this.disabled=!1,this.label="",this.supportingText="",this.overline="",this.leading=!1,this.leadingVariant="",this.leadingIcon="",this.avatarLabel="",this.avatarAlt="",this.avatarVariant="icon",this.avatarSrc="",this.imgHrefImage="",this.trailing=!1,this.trailingVariant="",this.trailingIcon="",this.trailingSwitchLabel="",this.trailingSwitchWidth="",this.trailingSwitchSelected=!1,this.density=0,this.noDivider=!1,g(this,y,!1),g(this,b,!1),g(this,m,!1),this.onRowClick=()=>{if(this.type==="link"&&(this.href||this.itemHref))return;const t=this.shadowRoot?.querySelector("scb-checkbox"),i=this.shadowRoot?.querySelector("scb-switch");if(t&&(t.checked=!t.checked),i){const e=!this.trailingSwitchSelected;i.selected=e,f(this,v,x).call(this,e,!0)}},g(this,k,t=>{const i=t.detail?.selected,e=typeof i=="boolean"?i:t.currentTarget?.selected??!1;f(this,v,x).call(this,e,!0)}),g(this,$,t=>{if(!t.defaultPrevented&&(t.key==="Enter"||t.key===" ")){if(this.type==="link"){const i=this.shadowRoot?.querySelector("a[href]");if(i){t.preventDefault(),i.click();return}}t.preventDefault(),this.onRowClick()}})}static get styles(){return z`
|
|
3
3
|
:host {
|
|
4
4
|
border-bottom: var(--stroke-border, 1px) solid var(--md-sys-color-outline-variant);
|
|
5
5
|
margin-bottom: calc(var(--stroke-border, 1px) * -1);
|
|
@@ -88,6 +88,9 @@ import{_ as m}from"../../vendor/preload-helper.js";import{n as s,t as I,i as L,a
|
|
|
88
88
|
|
|
89
89
|
|
|
90
90
|
.trailing { margin-left: auto; align-self: center; display: flex; }
|
|
91
|
+
.trailing.trailing-switch {
|
|
92
|
+
justify-content: flex-end;
|
|
93
|
+
}
|
|
91
94
|
.trailing scb-checkbox { margin-inline-end: var(--scb-list-trailing-checkbox-nudge); }
|
|
92
95
|
|
|
93
96
|
:host([trailing-variant="checkbox"]) .row,
|
|
@@ -106,7 +109,7 @@ import{_ as m}from"../../vendor/preload-helper.js";import{n as s,t as I,i as L,a
|
|
|
106
109
|
width: 100%;
|
|
107
110
|
gap: 12px;
|
|
108
111
|
}
|
|
109
|
-
`}async firstUpdated(){await
|
|
112
|
+
`}async firstUpdated(){await f(this,v,S).call(this),this.addEventListener("keydown",u(this,$))}updated(t){super.updated(t),(t.has("leading")||t.has("leadingVariant")||t.has("trailing")||t.has("trailingVariant")||t.has("type")||t.has("target"))&&f(this,v,S).call(this)}render(){const t=this.leading?(()=>{switch(this.leadingVariant){case"icon":return this.leadingIcon?l`<div class="leading"><md-icon>${this.leadingIcon}</md-icon></div>`:n;case"avatar":return l`
|
|
110
113
|
<div class="leading">
|
|
111
114
|
<scb-avatar
|
|
112
115
|
label=${this.avatarLabel}
|
|
@@ -117,32 +120,34 @@ import{_ as m}from"../../vendor/preload-helper.js";import{n as s,t as I,i as L,a
|
|
|
117
120
|
variant=${this.avatarVariant}
|
|
118
121
|
></scb-avatar>
|
|
119
122
|
</div>
|
|
120
|
-
`;case"image":return this.imgHrefImage?
|
|
123
|
+
`;case"image":return this.imgHrefImage?l`<div class="leading"><img class="img" part="leading-image" src="${this.imgHrefImage}" alt="" /></div>`:n;default:return n}})():n,i=this.href||this.itemHref||"",e=this.target==="_blank"?"open_in_new":"chevron_right",d=this.label?`Välj ${this.label}`:"Välj",c=this.label?`Växla ${this.label}`:"Växla";let o=n;if(this.trailing){if(this.trailingVariant==="icon"){const p=this.trailingIcon||(this.type==="link"?e:"");o=p?l`<div class="trailing"><md-icon>${p}</md-icon></div>`:n}else if(this.trailingVariant==="checkbox")o=l`
|
|
121
124
|
<div class="trailing">
|
|
122
125
|
<scb-checkbox
|
|
123
126
|
aria-label=${d}
|
|
124
|
-
@click=${
|
|
127
|
+
@click=${p=>p.stopPropagation()}
|
|
125
128
|
></scb-checkbox>
|
|
126
|
-
</div
|
|
127
|
-
<div class="trailing">
|
|
129
|
+
</div>`;else if(this.trailingVariant==="switch"){const p=this.trailingSwitchWidth?`inline-size: ${this.trailingSwitchWidth}; min-inline-size: ${this.trailingSwitchWidth};`:n;o=l`
|
|
130
|
+
<div class="trailing trailing-switch" style=${p}>
|
|
128
131
|
<scb-switch
|
|
129
|
-
|
|
132
|
+
.selected=${this.trailingSwitchSelected}
|
|
133
|
+
label=${this.trailingSwitchLabel||n}
|
|
130
134
|
aria-label=${c}
|
|
131
|
-
@click=${
|
|
135
|
+
@click=${L=>L.stopPropagation()}
|
|
136
|
+
@change=${u(this,k)}
|
|
132
137
|
></scb-switch>
|
|
133
|
-
</div>`
|
|
138
|
+
</div>`}}else this.type==="link"&&(o=l`<div class="trailing"><md-icon>${e}</md-icon></div>`);const h=this.type==="link"&&this.target==="_blank"?"noopener noreferrer":n,I=l`
|
|
134
139
|
${t}
|
|
135
140
|
<div class="texts">
|
|
136
|
-
${this.overline?
|
|
141
|
+
${this.overline?l`<div class="overline">${this.overline}</div>`:n}
|
|
137
142
|
<div class="label">${this.label}</div>
|
|
138
|
-
${this.supportingText?
|
|
143
|
+
${this.supportingText?l`<div class="supporting-text">${this.supportingText}</div>`:n}
|
|
139
144
|
</div>
|
|
140
145
|
${o}
|
|
141
|
-
`;return
|
|
146
|
+
`;return l`
|
|
142
147
|
<div class="row" @click=${this.onRowClick} ?inert=${this.disabled} aria-disabled=${this.disabled?"true":"false"}>
|
|
143
|
-
${this.type==="link"&&i?
|
|
144
|
-
${this.type==="link"?
|
|
148
|
+
${this.type==="link"&&i?l`<a class="link" href=${i} target=${this.target||n} rel=${h}>${I}</a>`:I}
|
|
149
|
+
${this.type==="link"?l`<md-ripple></md-ripple>`:n}
|
|
145
150
|
</div>
|
|
146
151
|
|
|
147
152
|
<md-focus-ring></md-focus-ring>
|
|
148
|
-
`}};
|
|
153
|
+
`}};y=new WeakMap;b=new WeakMap;m=new WeakMap;v=new WeakSet;S=async function(){const t=this.type==="link"&&(!this.trailing||this.trailingVariant==="icon");(this.leading&&this.leadingVariant==="icon"||this.trailing&&this.trailingVariant==="icon"||t)&&!u(this,y)&&(await w(()=>import("../../vendor/vendor-material.js").then(e=>e.i),__vite__mapDeps([0,1]),import.meta.url),_(this,y,!0)),this.trailing&&this.trailingVariant==="checkbox"&&!u(this,b)&&(await w(()=>import("../scb-checkbox/scb-checkbox.js"),__vite__mapDeps([2,1,0,3]),import.meta.url),_(this,b,!0)),this.trailing&&this.trailingVariant==="switch"&&!u(this,m)&&(await w(()=>import("../scb-switch/scb-switch.js"),__vite__mapDeps([4,1,0]),import.meta.url),_(this,m,!0))};x=function(t,i){this.trailingSwitchSelected=t,i&&this.dispatchEvent(new CustomEvent("trailing-switch-change",{detail:{selected:t},bubbles:!0,composed:!0}))};k=new WeakMap;$=new WeakMap;r([s({type:String,reflect:!0,attribute:"type"})],a.prototype,"type",2);r([s({type:String})],a.prototype,"href",2);r([s({type:String,attribute:"item-href"})],a.prototype,"itemHref",2);r([s({type:String,attribute:"target"})],a.prototype,"target",2);r([s({type:Boolean,attribute:"disabled"})],a.prototype,"disabled",2);r([s({type:String,reflect:!0})],a.prototype,"label",2);r([s({type:String,attribute:"supporting-text"})],a.prototype,"supportingText",2);r([s({type:String,attribute:"overline"})],a.prototype,"overline",2);r([s({type:Boolean})],a.prototype,"leading",2);r([s({type:String,attribute:"leading-variant",reflect:!0})],a.prototype,"leadingVariant",2);r([s({type:String,attribute:"leading-icon"})],a.prototype,"leadingIcon",2);r([s({type:String,attribute:"avatar-label"})],a.prototype,"avatarLabel",2);r([s({type:String,attribute:"avatar-alt"})],a.prototype,"avatarAlt",2);r([s({type:String,attribute:"avatar-variant"})],a.prototype,"avatarVariant",2);r([s({type:String,attribute:"avatar-src"})],a.prototype,"avatarSrc",2);r([s({type:String,reflect:!0,attribute:"img-href-image"})],a.prototype,"imgHrefImage",2);r([s({type:Boolean})],a.prototype,"trailing",2);r([s({type:String,attribute:"trailing-variant",reflect:!0})],a.prototype,"trailingVariant",2);r([s({type:String,attribute:"trailing-icon"})],a.prototype,"trailingIcon",2);r([s({type:String,attribute:"trailing-switch-label"})],a.prototype,"trailingSwitchLabel",2);r([s({type:String,attribute:"trailing-switch-width"})],a.prototype,"trailingSwitchWidth",2);r([s({type:Boolean,attribute:"trailing-switch-selected",reflect:!0})],a.prototype,"trailingSwitchSelected",2);r([s({type:Number,reflect:!0})],a.prototype,"density",2);r([s({type:Boolean,attribute:"no-divider",reflect:!0})],a.prototype,"noDivider",2);a=r([T("scb-list-item")],a);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scb-wc-test",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.349",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.js",
|
|
@@ -414,5 +414,5 @@
|
|
|
414
414
|
},
|
|
415
415
|
"./mvc/*": "./mvc/*"
|
|
416
416
|
},
|
|
417
|
-
"buildHash": "
|
|
417
|
+
"buildHash": "8ACAE0EACE17B5D625FC0363C8E877B27149AFEA5AF1F2FB99D400E6D8D40C09"
|
|
418
418
|
}
|
|
@@ -21,6 +21,8 @@ export declare class ScbListItem extends LitElement {
|
|
|
21
21
|
trailingVariant: '' | 'icon' | 'checkbox' | 'switch';
|
|
22
22
|
trailingIcon: string;
|
|
23
23
|
trailingSwitchLabel: string;
|
|
24
|
+
trailingSwitchWidth: string;
|
|
25
|
+
trailingSwitchSelected: boolean;
|
|
24
26
|
density: -4 | -2 | 0;
|
|
25
27
|
noDivider: boolean;
|
|
26
28
|
static get styles(): import('lit').CSSResult;
|
|
@@ -1,22 +1,29 @@
|
|
|
1
|
-
import { LitElement as
|
|
2
|
-
import { property as s, customElement as
|
|
1
|
+
import { LitElement as W, css as z, nothing as o, html as c } from "lit";
|
|
2
|
+
import { property as s, customElement as C } from "lit/decorators.js";
|
|
3
3
|
import "@material/web/focus/md-focus-ring.js";
|
|
4
4
|
import "@material/web/ripple/ripple.js";
|
|
5
|
-
var
|
|
5
|
+
var T = Object.defineProperty, H = Object.getOwnPropertyDescriptor, I = (t) => {
|
|
6
6
|
throw TypeError(t);
|
|
7
7
|
}, r = (t, i, e, l) => {
|
|
8
|
-
for (var
|
|
9
|
-
(
|
|
10
|
-
return l &&
|
|
11
|
-
},
|
|
12
|
-
let a = class extends
|
|
8
|
+
for (var n = l > 1 ? void 0 : l ? H(i, e) : i, h = t.length - 1, v; h >= 0; h--)
|
|
9
|
+
(v = t[h]) && (n = (l ? v(i, e, n) : v(n)) || n);
|
|
10
|
+
return l && n && T(i, e, n), n;
|
|
11
|
+
}, _ = (t, i, e) => i.has(t) || I("Cannot " + e), y = (t, i, e) => (_(t, i, "read from private field"), e ? e.call(t) : i.get(t)), p = (t, i, e) => i.has(t) ? I("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(t) : i.set(t, e), w = (t, i, e, l) => (_(t, i, "write to private field"), i.set(t, e), e), f = (t, i, e) => (_(t, i, "access private method"), e), u, b, m, g, S, k, x, $;
|
|
12
|
+
let a = class extends W {
|
|
13
13
|
constructor() {
|
|
14
|
-
super(...arguments),
|
|
14
|
+
super(...arguments), p(this, g), this.type = "text", this.href = "", this.itemHref = "", this.target = "", this.disabled = !1, this.label = "", this.supportingText = "", this.overline = "", this.leading = !1, this.leadingVariant = "", this.leadingIcon = "", this.avatarLabel = "", this.avatarAlt = "", this.avatarVariant = "icon", this.avatarSrc = "", this.imgHrefImage = "", this.trailing = !1, this.trailingVariant = "", this.trailingIcon = "", this.trailingSwitchLabel = "", this.trailingSwitchWidth = "", this.trailingSwitchSelected = !1, this.density = 0, this.noDivider = !1, p(this, u, !1), p(this, b, !1), p(this, m, !1), this.onRowClick = () => {
|
|
15
15
|
var e, l;
|
|
16
16
|
if (this.type === "link" && (this.href || this.itemHref)) return;
|
|
17
17
|
const t = (e = this.shadowRoot) == null ? void 0 : e.querySelector("scb-checkbox"), i = (l = this.shadowRoot) == null ? void 0 : l.querySelector("scb-switch");
|
|
18
|
-
t && (t.checked = !t.checked), i
|
|
19
|
-
|
|
18
|
+
if (t && (t.checked = !t.checked), i) {
|
|
19
|
+
const n = !this.trailingSwitchSelected;
|
|
20
|
+
i.selected = n, f(this, g, k).call(this, n, !0);
|
|
21
|
+
}
|
|
22
|
+
}, p(this, x, (t) => {
|
|
23
|
+
var l, n;
|
|
24
|
+
const i = (l = t.detail) == null ? void 0 : l.selected, e = typeof i == "boolean" ? i : ((n = t.currentTarget) == null ? void 0 : n.selected) ?? !1;
|
|
25
|
+
f(this, g, k).call(this, e, !0);
|
|
26
|
+
}), p(this, $, (t) => {
|
|
20
27
|
var i;
|
|
21
28
|
if (!t.defaultPrevented && (t.key === "Enter" || t.key === " ")) {
|
|
22
29
|
if (this.type === "link") {
|
|
@@ -31,7 +38,7 @@ let a = class extends V {
|
|
|
31
38
|
});
|
|
32
39
|
}
|
|
33
40
|
static get styles() {
|
|
34
|
-
return
|
|
41
|
+
return z`
|
|
35
42
|
:host {
|
|
36
43
|
border-bottom: var(--stroke-border, 1px) solid var(--md-sys-color-outline-variant);
|
|
37
44
|
margin-bottom: calc(var(--stroke-border, 1px) * -1);
|
|
@@ -120,6 +127,9 @@ let a = class extends V {
|
|
|
120
127
|
|
|
121
128
|
|
|
122
129
|
.trailing { margin-left: auto; align-self: center; display: flex; }
|
|
130
|
+
.trailing.trailing-switch {
|
|
131
|
+
justify-content: flex-end;
|
|
132
|
+
}
|
|
123
133
|
.trailing scb-checkbox { margin-inline-end: var(--scb-list-trailing-checkbox-nudge); }
|
|
124
134
|
|
|
125
135
|
:host([trailing-variant="checkbox"]) .row,
|
|
@@ -141,18 +151,18 @@ let a = class extends V {
|
|
|
141
151
|
`;
|
|
142
152
|
}
|
|
143
153
|
async firstUpdated() {
|
|
144
|
-
await
|
|
154
|
+
await f(this, g, S).call(this), this.addEventListener("keydown", y(this, $));
|
|
145
155
|
}
|
|
146
156
|
updated(t) {
|
|
147
|
-
super.updated(t), (t.has("leading") || t.has("leadingVariant") || t.has("trailing") || t.has("trailingVariant") || t.has("type") || t.has("target")) &&
|
|
157
|
+
super.updated(t), (t.has("leading") || t.has("leadingVariant") || t.has("trailing") || t.has("trailingVariant") || t.has("type") || t.has("target")) && f(this, g, S).call(this);
|
|
148
158
|
}
|
|
149
159
|
render() {
|
|
150
160
|
const t = this.leading ? (() => {
|
|
151
161
|
switch (this.leadingVariant) {
|
|
152
162
|
case "icon":
|
|
153
|
-
return this.leadingIcon ?
|
|
163
|
+
return this.leadingIcon ? c`<div class="leading"><md-icon>${this.leadingIcon}</md-icon></div>` : o;
|
|
154
164
|
case "avatar":
|
|
155
|
-
return
|
|
165
|
+
return c`
|
|
156
166
|
<div class="leading">
|
|
157
167
|
<scb-avatar
|
|
158
168
|
label=${this.avatarLabel}
|
|
@@ -165,59 +175,74 @@ let a = class extends V {
|
|
|
165
175
|
</div>
|
|
166
176
|
`;
|
|
167
177
|
case "image":
|
|
168
|
-
return this.imgHrefImage ?
|
|
178
|
+
return this.imgHrefImage ? c`<div class="leading"><img class="img" part="leading-image" src="${this.imgHrefImage}" alt="" /></div>` : o;
|
|
169
179
|
default:
|
|
170
180
|
return o;
|
|
171
181
|
}
|
|
172
|
-
})() : o, i = this.href || this.itemHref || "", e = this.target === "_blank" ? "open_in_new" : "chevron_right", l = this.label ? `Välj ${this.label}` : "Välj",
|
|
173
|
-
let
|
|
174
|
-
if (this.trailing)
|
|
182
|
+
})() : o, i = this.href || this.itemHref || "", e = this.target === "_blank" ? "open_in_new" : "chevron_right", l = this.label ? `Välj ${this.label}` : "Välj", n = this.label ? `Växla ${this.label}` : "Växla";
|
|
183
|
+
let h = o;
|
|
184
|
+
if (this.trailing) {
|
|
175
185
|
if (this.trailingVariant === "icon") {
|
|
176
186
|
const d = this.trailingIcon || (this.type === "link" ? e : "");
|
|
177
|
-
|
|
178
|
-
} else this.trailingVariant === "checkbox"
|
|
187
|
+
h = d ? c`<div class="trailing"><md-icon>${d}</md-icon></div>` : o;
|
|
188
|
+
} else if (this.trailingVariant === "checkbox")
|
|
189
|
+
h = c`
|
|
179
190
|
<div class="trailing">
|
|
180
191
|
<scb-checkbox
|
|
181
192
|
aria-label=${l}
|
|
182
193
|
@click=${(d) => d.stopPropagation()}
|
|
183
194
|
></scb-checkbox>
|
|
184
|
-
</div
|
|
185
|
-
|
|
195
|
+
</div>`;
|
|
196
|
+
else if (this.trailingVariant === "switch") {
|
|
197
|
+
const d = this.trailingSwitchWidth ? `inline-size: ${this.trailingSwitchWidth}; min-inline-size: ${this.trailingSwitchWidth};` : o;
|
|
198
|
+
h = c`
|
|
199
|
+
<div class="trailing trailing-switch" style=${d}>
|
|
186
200
|
<scb-switch
|
|
201
|
+
.selected=${this.trailingSwitchSelected}
|
|
187
202
|
label=${this.trailingSwitchLabel || o}
|
|
188
|
-
aria-label=${
|
|
189
|
-
@click=${(
|
|
203
|
+
aria-label=${n}
|
|
204
|
+
@click=${(L) => L.stopPropagation()}
|
|
205
|
+
@change=${y(this, x)}
|
|
190
206
|
></scb-switch>
|
|
191
|
-
</div
|
|
192
|
-
|
|
193
|
-
|
|
207
|
+
</div>`;
|
|
208
|
+
}
|
|
209
|
+
} else this.type === "link" && (h = c`<div class="trailing"><md-icon>${e}</md-icon></div>`);
|
|
210
|
+
const v = this.type === "link" && this.target === "_blank" ? "noopener noreferrer" : o, V = c`
|
|
194
211
|
${t}
|
|
195
212
|
<div class="texts">
|
|
196
|
-
${this.overline ?
|
|
213
|
+
${this.overline ? c`<div class="overline">${this.overline}</div>` : o}
|
|
197
214
|
<div class="label">${this.label}</div>
|
|
198
|
-
${this.supportingText ?
|
|
215
|
+
${this.supportingText ? c`<div class="supporting-text">${this.supportingText}</div>` : o}
|
|
199
216
|
</div>
|
|
200
|
-
${
|
|
217
|
+
${h}
|
|
201
218
|
`;
|
|
202
|
-
return
|
|
219
|
+
return c`
|
|
203
220
|
<div class="row" @click=${this.onRowClick} ?inert=${this.disabled} aria-disabled=${this.disabled ? "true" : "false"}>
|
|
204
|
-
${this.type === "link" && i ?
|
|
205
|
-
${this.type === "link" ?
|
|
221
|
+
${this.type === "link" && i ? c`<a class="link" href=${i} target=${this.target || o} rel=${v}>${V}</a>` : V}
|
|
222
|
+
${this.type === "link" ? c`<md-ripple></md-ripple>` : o}
|
|
206
223
|
</div>
|
|
207
224
|
|
|
208
225
|
<md-focus-ring></md-focus-ring>
|
|
209
226
|
`;
|
|
210
227
|
}
|
|
211
228
|
};
|
|
212
|
-
f = /* @__PURE__ */ new WeakMap();
|
|
213
229
|
u = /* @__PURE__ */ new WeakMap();
|
|
214
230
|
b = /* @__PURE__ */ new WeakMap();
|
|
215
|
-
|
|
216
|
-
|
|
231
|
+
m = /* @__PURE__ */ new WeakMap();
|
|
232
|
+
g = /* @__PURE__ */ new WeakSet();
|
|
233
|
+
S = async function() {
|
|
217
234
|
const t = this.type === "link" && (!this.trailing || this.trailingVariant === "icon");
|
|
218
|
-
(this.leading && this.leadingVariant === "icon" || this.trailing && this.trailingVariant === "icon" || t) && !
|
|
235
|
+
(this.leading && this.leadingVariant === "icon" || this.trailing && this.trailingVariant === "icon" || t) && !y(this, u) && (await import("@material/web/icon/icon.js"), w(this, u, !0)), this.trailing && this.trailingVariant === "checkbox" && !y(this, b) && (await import("../scb-checkbox/scb-checkbox.js"), w(this, b, !0)), this.trailing && this.trailingVariant === "switch" && !y(this, m) && (await import("../scb-switch/scb-switch.js"), w(this, m, !0));
|
|
236
|
+
};
|
|
237
|
+
k = function(t, i) {
|
|
238
|
+
this.trailingSwitchSelected = t, i && this.dispatchEvent(new CustomEvent("trailing-switch-change", {
|
|
239
|
+
detail: { selected: t },
|
|
240
|
+
bubbles: !0,
|
|
241
|
+
composed: !0
|
|
242
|
+
}));
|
|
219
243
|
};
|
|
220
|
-
|
|
244
|
+
x = /* @__PURE__ */ new WeakMap();
|
|
245
|
+
$ = /* @__PURE__ */ new WeakMap();
|
|
221
246
|
r([
|
|
222
247
|
s({ type: String, reflect: !0, attribute: "type" })
|
|
223
248
|
], a.prototype, "type", 2);
|
|
@@ -278,6 +303,12 @@ r([
|
|
|
278
303
|
r([
|
|
279
304
|
s({ type: String, attribute: "trailing-switch-label" })
|
|
280
305
|
], a.prototype, "trailingSwitchLabel", 2);
|
|
306
|
+
r([
|
|
307
|
+
s({ type: String, attribute: "trailing-switch-width" })
|
|
308
|
+
], a.prototype, "trailingSwitchWidth", 2);
|
|
309
|
+
r([
|
|
310
|
+
s({ type: Boolean, attribute: "trailing-switch-selected", reflect: !0 })
|
|
311
|
+
], a.prototype, "trailingSwitchSelected", 2);
|
|
281
312
|
r([
|
|
282
313
|
s({ type: Number, reflect: !0 })
|
|
283
314
|
], a.prototype, "density", 2);
|
|
@@ -285,7 +316,7 @@ r([
|
|
|
285
316
|
s({ type: Boolean, attribute: "no-divider", reflect: !0 })
|
|
286
317
|
], a.prototype, "noDivider", 2);
|
|
287
318
|
a = r([
|
|
288
|
-
|
|
319
|
+
C("scb-list-item")
|
|
289
320
|
], a);
|
|
290
321
|
export {
|
|
291
322
|
a as ScbListItem
|