scb-wc-test 0.1.20 → 0.1.22

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,4 +1,4 @@
1
- import{n as l,t as b,i as p,a as d,x as u}from"../../vendor/vendor.js";(function(){try{var i=typeof globalThis<"u"?globalThis:window;if(!i.__scb_ce_guard_installed__){i.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(r,s,e){try{customElements.get(r)||t(r,s,e)}catch(n){var a=String(n||"");if(a.indexOf("already been used")===-1&&a.indexOf("NotSupportedError")===-1)throw n}}}}catch{}})();var f=Object.defineProperty,m=Object.getOwnPropertyDescriptor,o=(i,t,r,s)=>{for(var e=s>1?void 0:s?m(t,r):t,a=i.length-1,n;a>=0;a--)(n=i[a])&&(e=(s?n(t,r,e):n(e))||e);return s&&e&&f(t,r,e),e};let c=class extends p{constructor(){super(...arguments),this.label="",this.isCurrent=!1,this.href=""}static get styles(){return d`
1
+ import{n as l,t as p,i as b,a as d,x as u}from"../../vendor/vendor.js";import"../scb-link/scb-link.js";import"../../vendor/vendor-material.js";(function(){try{var n=typeof globalThis<"u"?globalThis:window;if(!n.__scb_ce_guard_installed__){n.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(r,s,e){try{customElements.get(r)||t(r,s,e)}catch(i){var a=String(i||"");if(a.indexOf("already been used")===-1&&a.indexOf("NotSupportedError")===-1)throw i}}}}catch{}})();var f=Object.defineProperty,m=Object.getOwnPropertyDescriptor,c=(n,t,r,s)=>{for(var e=s>1?void 0:s?m(t,r):t,a=n.length-1,i;a>=0;a--)(i=n[a])&&(e=(s?i(t,r,e):i(e))||e);return s&&e&&f(t,r,e),e};let o=class extends b{constructor(){super(...arguments),this.label="",this.isCurrent=!1,this.href=""}static get styles(){return d`
2
2
  .breadcrumb-separator {
3
3
  margin: 0 8px;
4
4
  color: var(--md-sys-color-on-surface);
@@ -12,6 +12,6 @@ import{n as l,t as b,i as p,a as d,x as u}from"../../vendor/vendor.js";(function
12
12
  text-decoration-thickness: 2px;
13
13
  }
14
14
  `}render(){switch(!0){case this.isCurrent:return u`<span class="breadcrumb-current">${this.label}</span>`;default:return u`
15
- <a href="${this.href}" class="breadcrumb-link">${this.label}</a>
15
+ <scb-link href="${this.href}">${this.label}</scb-link>
16
16
  <span class="breadcrumb-separator">/</span>
17
- `}}};o([l({type:String})],c.prototype,"label",2);o([l({type:Boolean,attribute:"is-current"})],c.prototype,"isCurrent",2);o([l({type:String,attribute:"item-href"})],c.prototype,"href",2);c=o([b("scb-breadcrumb-item")],c);
17
+ `}}};c([l({type:String})],o.prototype,"label",2);c([l({type:Boolean,attribute:"is-current"})],o.prototype,"isCurrent",2);c([l({type:String,attribute:"item-href"})],o.prototype,"href",2);o=c([p("scb-breadcrumb-item")],o);
@@ -1,4 +1,4 @@
1
- import{n as d,t as m,i as b,a as p,x as o}from"../../vendor/vendor.js";import"./scb-breadcrumb-item.js";import"../../vendor/vendor-material.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var r=customElements.define.bind(customElements);customElements.define=function(s,t,a){try{customElements.get(s)||r(s,t,a)}catch(i){var l=String(i||"");if(l.indexOf("already been used")===-1&&l.indexOf("NotSupportedError")===-1)throw i}}}}catch{}})();var u=Object.defineProperty,h=Object.getOwnPropertyDescriptor,c=(e,r,s,t)=>{for(var a=t>1?void 0:t?h(r,s):r,l=e.length-1,i;l>=0;l--)(i=e[l])&&(a=(t?i(r,s,a):i(a))||a);return t&&a&&u(r,s,a),a};let n=class extends b{constructor(){super(...arguments),this.showAll=!1}static get styles(){return p`
1
+ import{n as d,t as m,i as p,a as b,x as o}from"../../vendor/vendor.js";import"./scb-breadcrumb-item.js";import"../../vendor/vendor-material.js";import"../scb-link/scb-link.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var r=customElements.define.bind(customElements);customElements.define=function(s,i,a){try{customElements.get(s)||r(s,i,a)}catch(l){var t=String(l||"");if(t.indexOf("already been used")===-1&&t.indexOf("NotSupportedError")===-1)throw l}}}}catch{}})();var u=Object.defineProperty,f=Object.getOwnPropertyDescriptor,c=(e,r,s,i)=>{for(var a=i>1?void 0:i?f(r,s):r,t=e.length-1,l;t>=0;t--)(l=e[t])&&(a=(i?l(r,s,a):l(a))||a);return i&&a&&u(r,s,a),a};let n=class extends p{constructor(){super(...arguments),this.showAll=!1}static get styles(){return b`
2
2
  .scb-breadcrumb {
3
3
  display: flex;
4
4
  align-items: center;
@@ -15,10 +15,14 @@ import{n as d,t as m,i as b,a as p,x as o}from"../../vendor/vendor.js";import"./
15
15
  .collapsed > scb-breadcrumb-item:nth-last-child(-n+3) {
16
16
  display: inline-flex;
17
17
  }
18
+ .ellipsis:focus {
19
+ outline: none;
20
+ }
18
21
  .ellipsis {
19
22
  cursor: pointer;
20
23
  display: inline-flex;
21
24
  color: var(--md-sys-color-primary);
25
+ position: relative;
22
26
  }
23
27
  .collapsed .ellipsis {
24
28
  display: inline-flex;
@@ -31,6 +35,16 @@ import{n as d,t as m,i as b,a as p,x as o}from"../../vendor/vendor.js";import"./
31
35
  transform: translateY(10px);
32
36
  animation: fadeInBreadcrumb 0.4s cubic-bezier(0.4,0,0.2,1) forwards;
33
37
  }
38
+ md-focus-ring {
39
+ position: absolute;
40
+ inset: 0;
41
+ pointer-events: none;
42
+ display: none;
43
+ border-radius: var(--scb-card-focus-ring-radius, var(--md-sys-shape-corner-large));
44
+ }
45
+ .ellipsis:focus md-focus-ring {
46
+ display: block;
47
+ }
34
48
  @keyframes fadeInBreadcrumb {
35
49
  to {
36
50
  opacity: 1;
@@ -39,13 +53,13 @@ import{n as d,t as m,i as b,a as p,x as o}from"../../vendor/vendor.js";import"./
39
53
  }
40
54
  `}_onEllipsisClick(){this.showAll?this.showAll=!1:(this.showAll=!0,this.updateComplete.then(()=>{const e=this.shadowRoot?.querySelectorAll(".scb-breadcrumb.expanded > scb-breadcrumb-item");e&&(e.forEach((r,s)=>{r.classList.add("breadcrumb-animate"),r.style.animationDelay=`${s*60}ms`}),setTimeout(()=>{e.forEach(r=>{r.classList.remove("breadcrumb-animate"),r.style.animationDelay=""})},600))}))}render(){let e=[];this.children.length||(e=Array.from(this.shadowRoot?this.shadowRoot.querySelectorAll("scb-breadcrumb-item"):[])),e.length||(e=Array.from(this.children).filter(s=>s.tagName.toLowerCase()==="scb-breadcrumb-item")),e.length>0&&e[e.length-1].setAttribute("is-current","true");const r=e.length>6&&!this.showAll;return o`
41
55
  <div class="scb-breadcrumb ${r?"collapsed":"expanded"}">
42
- ${r?e.map((s,t)=>t===3?o`<span
56
+ ${r?e.map((s,i)=>i===3?o`<span
43
57
  class="ellipsis"
44
58
  aria-label="Visa alla"
45
59
  role="button"
46
60
  tabindex="0"
47
61
  @click=${this._onEllipsisClick}
48
62
  @keydown=${a=>{(a.key==="Enter"||a.key===" ")&&this._onEllipsisClick()}}
49
- ><md-icon>more_horiz</md-icon></span><span class="breadcrumb-separator">/</span>${s}`:o`${s}`):e.map(s=>s)}
63
+ ><md-icon><md-focus-ring></md-focus-ring>more_horiz</md-icon></span><span class="breadcrumb-separator">/</span>${s}`:o`${s}`):e.map(s=>s)}
50
64
  </div>
51
65
  `}};c([d({type:Boolean})],n.prototype,"showAll",2);n=c([m("scb-breadcrumb")],n);
@@ -1,4 +1,4 @@
1
- import{a as p,n as s,i as u,x as d,t as h}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";import"../scb-icon-button/scb-icon-button.js";import"./scb-fact-card-content.js";import"../../vendor/preload-helper.js";import"../scb-tooltip/scb-tooltip.js";import"../scb-button/scb-button.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(n,a,r){try{customElements.get(n)||e(n,a,r)}catch(c){var l=String(c||"");if(l.indexOf("already been used")===-1&&l.indexOf("NotSupportedError")===-1)throw c}}}}catch{}})();var f=Object.defineProperty,b=Object.getOwnPropertyDescriptor,o=(t,e,n,a)=>{for(var r=a>1?void 0:a?b(e,n):e,l=t.length-1,c;l>=0;l--)(c=t[l])&&(r=(a?c(e,n,r):c(r))||r);return a&&r&&f(e,n,r),r};let i=class extends u{constructor(){super(...arguments),this.__onCloseClick=t=>{t.stopPropagation(),this.__setOpen(!1)},this.variant="filled",this.label="",this.subLabel="",this.supportingText="",this.icon="",this.showCloseButton=!1,this.open=!0,this.__lastTriggerEl=null,this.fullHeight=!1,this.fullWidth=!1,this.stretch=!1,this.__onDocumentClick=t=>{this.__getActionFromEvent(t)==="toggle"&&(this.__setOpen(!this.open),t.stopPropagation())}}__getActionFromEvent(t){if(!this.id)return null;for(const e of t.composedPath())if(e instanceof Element){if(e.getAttribute("data-fact-card-toggle")===this.id)return this.__lastTriggerEl=e,"toggle";if(e.getAttribute("aria-controls")===this.id)return this.__lastTriggerEl=e,"toggle"}return null}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.__onDocumentClick,!1)}disconnectedCallback(){document.removeEventListener("click",this.__onDocumentClick,!1),super.disconnectedCallback()}updated(t){t.has("open")&&this.__updateTriggersExpanded()}__updateTriggersExpanded(){this.id&&document.querySelectorAll(`[aria-controls="${this.id}"], [data-fact-card-toggle="${this.id}"]`).forEach(t=>{t.hasAttribute("aria-controls")&&t.setAttribute("aria-expanded",String(this.open))})}__setOpen(t){const e=this.open;this.open=t,t&&!e?this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0})):!t&&e&&this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}render(){if(!this.open)return d``;const t=this.variant==="outlined"?"outlined":"filled";return d`
1
+ import{a as p,n as s,i as u,x as d,t as h}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";import"../scb-icon-button/scb-icon-button.js";import"./scb-fact-card-content.js";import"../scb-link/scb-link.js";import"../../vendor/preload-helper.js";import"../scb-tooltip/scb-tooltip.js";import"../scb-button/scb-button.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(n,a,r){try{customElements.get(n)||e(n,a,r)}catch(c){var l=String(c||"");if(l.indexOf("already been used")===-1&&l.indexOf("NotSupportedError")===-1)throw c}}}}catch{}})();var f=Object.defineProperty,b=Object.getOwnPropertyDescriptor,o=(t,e,n,a)=>{for(var r=a>1?void 0:a?b(e,n):e,l=t.length-1,c;l>=0;l--)(c=t[l])&&(r=(a?c(e,n,r):c(r))||r);return a&&r&&f(e,n,r),r};let i=class extends u{constructor(){super(...arguments),this.__onCloseClick=t=>{t.stopPropagation(),this.__setOpen(!1)},this.variant="filled",this.label="",this.subLabel="",this.supportingText="",this.icon="",this.showCloseButton=!1,this.open=!0,this.__lastTriggerEl=null,this.fullHeight=!1,this.fullWidth=!1,this.stretch=!1,this.__onDocumentClick=t=>{this.__getActionFromEvent(t)==="toggle"&&(this.__setOpen(!this.open),t.stopPropagation())}}__getActionFromEvent(t){if(!this.id)return null;for(const e of t.composedPath())if(e instanceof Element){if(e.getAttribute("data-fact-card-toggle")===this.id)return this.__lastTriggerEl=e,"toggle";if(e.getAttribute("aria-controls")===this.id)return this.__lastTriggerEl=e,"toggle"}return null}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.__onDocumentClick,!1)}disconnectedCallback(){document.removeEventListener("click",this.__onDocumentClick,!1),super.disconnectedCallback()}updated(t){t.has("open")&&this.__updateTriggersExpanded()}__updateTriggersExpanded(){this.id&&document.querySelectorAll(`[aria-controls="${this.id}"], [data-fact-card-toggle="${this.id}"]`).forEach(t=>{t.hasAttribute("aria-controls")&&t.setAttribute("aria-expanded",String(this.open))})}__setOpen(t){const e=this.open;this.open=t,t&&!e?this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0})):!t&&e&&this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}render(){if(!this.open)return d``;const t=this.variant==="outlined"?"outlined":"filled";return d`
2
2
  ${this.icon?d`<div class="icon-wrapper ${t}"><md-icon>${this.icon}</md-icon></div>`:""}
3
3
  <div class="scb-fact-card ${t} ${this.icon?"no-topleft-radius":""} ${this.showCloseButton?"has-close":""}">
4
4
  ${this.showCloseButton?d`<scb-icon-button variant="standard" icon="close" @click=${this.__onCloseClick}></scb-icon-button>`:""}
@@ -1,4 +1,4 @@
1
- import{a as u,n as c,i as h,f as d,x as v,t as b}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(r,s,a){try{customElements.get(r)||t(r,s,a)}catch(l){var n=String(l||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw l}}}}catch{}})();var _=Object.defineProperty,y=Object.getOwnPropertyDescriptor,f=e=>{throw TypeError(e)},o=(e,t,r,s)=>{for(var a=s>1?void 0:s?y(t,r):t,n=e.length-1,l;n>=0;n--)(l=e[n])&&(a=(s?l(t,r,a):l(a))||a);return s&&a&&_(t,r,a),a},g=(e,t,r)=>t.has(e)||f("Cannot "+r),m=(e,t,r)=>(g(e,t,"read from private field"),r?r.call(e):t.get(e)),k=(e,t,r)=>t.has(e)?f("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),p;let i=class extends h{constructor(){super(...arguments),this.href="",this.disabled=!1,this.ariaLabel="",k(this,p,e=>{this.disabled&&(e.preventDefault(),e.stopPropagation())})}render(){const e=this.target==="_blank"&&!this.rel?"noopener noreferrer":this.rel;return v`
1
+ import{a as u,n as c,i as h,f as d,x as v,t as b}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(r,n,i){try{customElements.get(r)||t(r,n,i)}catch(l){var s=String(l||"");if(s.indexOf("already been used")===-1&&s.indexOf("NotSupportedError")===-1)throw l}}}}catch{}})();var _=Object.defineProperty,y=Object.getOwnPropertyDescriptor,f=e=>{throw TypeError(e)},o=(e,t,r,n)=>{for(var i=n>1?void 0:n?y(t,r):t,s=e.length-1,l;s>=0;s--)(l=e[s])&&(i=(n?l(t,r,i):l(i))||i);return n&&i&&_(t,r,i),i},g=(e,t,r)=>t.has(e)||f("Cannot "+r),m=(e,t,r)=>(g(e,t,"read from private field"),r?r.call(e):t.get(e)),k=(e,t,r)=>t.has(e)?f("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),p;let a=class extends h{constructor(){super(...arguments),this.href="",this.disabled=!1,this.ariaLabel="",k(this,p,e=>{this.disabled&&(e.preventDefault(),e.stopPropagation())})}render(){const e=this.target==="_blank"&&!this.rel?"noopener noreferrer":this.rel;return v`
2
2
  <a
3
3
  part="anchor"
4
4
  href=${d(this.disabled?void 0:this.href||void 0)}
@@ -11,13 +11,14 @@ import{a as u,n as c,i as h,f as d,x as v,t as b}from"../../vendor/vendor.js";im
11
11
  ><slot></slot></a>
12
12
 
13
13
  <md-focus-ring></md-focus-ring>
14
- `}};p=new WeakMap;i.styles=u`
14
+ `}};p=new WeakMap;a.styles=u`
15
15
  :host {
16
16
  display: inline-block;
17
17
  position: relative;
18
18
  padding: var(--scb-link-focus-ring-gap, 4px);
19
19
  font-family: var(--brand-font, inherit);
20
20
  color: var(--md-sys-color-on-surface);
21
+ width: fit-content;
21
22
  }
22
23
 
23
24
  md-focus-ring {
@@ -46,7 +47,6 @@ import{a as u,n as c,i as h,f as d,x as v,t as b}from"../../vendor/vendor.js";im
46
47
  }
47
48
  a:hover { text-decoration-thickness: var(--scb-link-hover-thickness, 2px); }
48
49
  a:focus { outline: none; }
49
- a:visited { color: var(--scb-link-visited-color, var(--md-sys-color-on-surface)); }
50
50
 
51
51
  :host([disabled]) a {
52
52
  pointer-events: none;
@@ -54,4 +54,4 @@ import{a as u,n as c,i as h,f as d,x as v,t as b}from"../../vendor/vendor.js";im
54
54
  text-decoration: none;
55
55
  cursor: default;
56
56
  }
57
- `;o([c({type:String,reflect:!0})],i.prototype,"href",2);o([c({type:String,reflect:!0})],i.prototype,"target",2);o([c({type:String,reflect:!0})],i.prototype,"rel",2);o([c({type:String,reflect:!0})],i.prototype,"download",2);o([c({type:Boolean,reflect:!0})],i.prototype,"disabled",2);o([c({type:String,attribute:"aria-label"})],i.prototype,"ariaLabel",2);i=o([b("scb-link")],i);
57
+ `;o([c({type:String,reflect:!0})],a.prototype,"href",2);o([c({type:String,reflect:!0})],a.prototype,"target",2);o([c({type:String,reflect:!0})],a.prototype,"rel",2);o([c({type:String,reflect:!0})],a.prototype,"download",2);o([c({type:Boolean,reflect:!0})],a.prototype,"disabled",2);o([c({type:String,attribute:"aria-label"})],a.prototype,"ariaLabel",2);a=o([b("scb-link")],a);
@@ -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-switch/scb-switch.js","../../vendor/preload-helper.js"])))=>i.map(i=>d[i]);
2
- import{_ as m}from"../../vendor/preload-helper.js";import{n as s,t as $,i as V,a as I,E as d,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,n,c){try{customElements.get(e)||i(e,n,c)}catch(o){var p=String(o||"");if(p.indexOf("already been used")===-1&&p.indexOf("NotSupportedError")===-1)throw o}}}}catch{}})();var E=Object.defineProperty,L=Object.getOwnPropertyDescriptor,S=t=>{throw TypeError(t)},r=(t,i,e,n)=>{for(var c=n>1?void 0:n?L(i,e):i,p=t.length-1,o;p>=0;p--)(o=t[p])&&(c=(n?o(i,e,c):o(c))||c);return n&&c&&E(i,e,c),c},k=(t,i,e)=>i.has(t)||S("Cannot "+e),g=(t,i,e)=>(k(t,i,"read from private field"),e?e.call(t):i.get(t)),h=(t,i,e)=>i.has(t)?S("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(t):i.set(t,e),b=(t,i,e,n)=>(k(t,i,"write to private field"),i.set(t,e),e),x=(t,i,e)=>(k(t,i,"access private method"),e),u,f,y,v,_,w;let a=class extends V{constructor(){super(...arguments),h(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.density=0,h(this,u,!1),h(this,f,!1),h(this,y,!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");t&&(t.checked=!t.checked),i&&(i.selected=!i.selected)},h(this,w,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 I`
2
+ import{_ as m}from"../../vendor/preload-helper.js";import{n as s,t as $,i as V,a as I,E as d,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,n,c){try{customElements.get(e)||i(e,n,c)}catch(o){var p=String(o||"");if(p.indexOf("already been used")===-1&&p.indexOf("NotSupportedError")===-1)throw o}}}}catch{}})();var E=Object.defineProperty,L=Object.getOwnPropertyDescriptor,S=t=>{throw TypeError(t)},r=(t,i,e,n)=>{for(var c=n>1?void 0:n?L(i,e):i,p=t.length-1,o;p>=0;p--)(o=t[p])&&(c=(n?o(i,e,c):o(c))||c);return n&&c&&E(i,e,c),c},k=(t,i,e)=>i.has(t)||S("Cannot "+e),g=(t,i,e)=>(k(t,i,"read from private field"),e?e.call(t):i.get(t)),h=(t,i,e)=>i.has(t)?S("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(t):i.set(t,e),b=(t,i,e,n)=>(k(t,i,"write to private field"),i.set(t,e),e),x=(t,i,e)=>(k(t,i,"access private method"),e),u,f,y,v,_,w;let a=class extends V{constructor(){super(...arguments),h(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.density=0,this.noDivider=!1,h(this,u,!1),h(this,f,!1),h(this,y,!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");t&&(t.checked=!t.checked),i&&(i.selected=!i.selected)},h(this,w,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 I`
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);
@@ -9,6 +9,9 @@ import{_ as m}from"../../vendor/preload-helper.js";import{n as s,t as $,i as V,a
9
9
  font-family: var(--brand-font);
10
10
  }
11
11
 
12
+ /* Per-item: ingen divider när attributet är satt */
13
+ :host([no-divider]) { --stroke-border: 0px; }
14
+
12
15
  md-focus-ring {
13
16
  position: absolute;
14
17
  inset: 0;
@@ -93,11 +96,11 @@ import{_ as m}from"../../vendor/preload-helper.js";import{n as s,t as $,i as V,a
93
96
 
94
97
  :host([trailing-variant="checkbox"]) .row,
95
98
  :host([trailing-variant="switch"]) .row {
96
- cursor: pointer;
99
+ cursor: pointer;
97
100
  }
98
101
 
99
102
  :host([disabled]) .row {
100
- cursor: default;
103
+ cursor: default;
101
104
  }
102
105
 
103
106
  .link { text-decoration: none; color: inherit; display: contents; }
@@ -127,4 +130,4 @@ import{_ as m}from"../../vendor/preload-helper.js";import{n as s,t as $,i as V,a
127
130
  </div>
128
131
 
129
132
  <md-focus-ring></md-focus-ring>
130
- `}};u=new WeakMap;f=new WeakMap;y=new WeakMap;v=new WeakSet;_=async function(){const t=this.type==="link"&&(!this.trailing||this.trailingVariant==="icon");(this.leading&&this.leadingVariant==="icon"||this.trailing&&this.trailingVariant==="icon"||t)&&!g(this,u)&&(await m(()=>import("../../vendor/vendor-material.js").then(e=>e.i),__vite__mapDeps([0,1]),import.meta.url),b(this,u,!0)),this.trailing&&this.trailingVariant==="checkbox"&&!g(this,f)&&(await m(()=>import("../scb-checkbox/scb-checkbox.js"),__vite__mapDeps([2,1,0]),import.meta.url),b(this,f,!0)),this.trailing&&this.trailingVariant==="switch"&&!g(this,y)&&(await m(()=>import("../scb-switch/scb-switch.js"),__vite__mapDeps([3,4,1]),import.meta.url),b(this,y,!0))};w=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:Number,reflect:!0})],a.prototype,"density",2);a=r([$("scb-list-item")],a);
133
+ `}};u=new WeakMap;f=new WeakMap;y=new WeakMap;v=new WeakSet;_=async function(){const t=this.type==="link"&&(!this.trailing||this.trailingVariant==="icon");(this.leading&&this.leadingVariant==="icon"||this.trailing&&this.trailingVariant==="icon"||t)&&!g(this,u)&&(await m(()=>import("../../vendor/vendor-material.js").then(e=>e.i),__vite__mapDeps([0,1]),import.meta.url),b(this,u,!0)),this.trailing&&this.trailingVariant==="checkbox"&&!g(this,f)&&(await m(()=>import("../scb-checkbox/scb-checkbox.js"),__vite__mapDeps([2,1,0]),import.meta.url),b(this,f,!0)),this.trailing&&this.trailingVariant==="switch"&&!g(this,y)&&(await m(()=>import("../scb-switch/scb-switch.js"),__vite__mapDeps([3,4,1]),import.meta.url),b(this,y,!0))};w=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:Number,reflect:!0})],a.prototype,"density",2);r([s({type:Boolean,attribute:"no-divider",reflect:!0})],a.prototype,"noDivider",2);a=r([$("scb-list-item")],a);
@@ -1,9 +1,9 @@
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 f}from"../../vendor/preload-helper.js";import{a as h,b as p,i as m,x as v,t as b}from"../../vendor/vendor.js";import"./scb-list-item.js";import"../../vendor/vendor-material.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(s,r,i){try{customElements.get(s)||t(s,r,i)}catch(a){var o=String(a||"");if(o.indexOf("already been used")===-1&&o.indexOf("NotSupportedError")===-1)throw a}}}}catch{}})();var g=Object.defineProperty,w=Object.getOwnPropertyDescriptor,d=e=>{throw TypeError(e)},c=(e,t,s,r)=>{for(var i=r>1?void 0:r?w(t,s):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(r?a(t,s,i):a(i))||i);return r&&i&&g(t,s,i),i},_=(e,t,s)=>t.has(e)||d("Cannot "+s),y=(e,t,s)=>(_(e,t,"read from private field"),t.get(e)),E=(e,t,s)=>t.has(e)?d("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),A=(e,t,s,r)=>(_(e,t,"write to private field"),t.set(e,s),s),n;let l=class extends m{constructor(){super(...arguments),E(this,n,!1),this._onSlotChange=()=>this._setupItems()}async firstUpdated(){y(this,n)||(await f(()=>import("../../vendor/vendor-material.js").then(e=>e.l),__vite__mapDeps([0,1]),import.meta.url),A(this,n,!0)),this._setupItems()}_getItems(){return(this._slotEl?.assignedElements({flatten:!0})??[]).filter(t=>t instanceof HTMLElement)}_setupItems(){this._getItems().forEach((s,r)=>{s.hasAttribute("role")||s.setAttribute("role","listitem"),s.setAttribute("tabindex",r===0?"0":"-1")});const t=this.renderRoot?.querySelector("md-list");t&&!t.hasAttribute("data-kbd")&&(t.setAttribute("data-kbd","true"),t.addEventListener("keydown",s=>this._onKeyDown(s)))}_onKeyDown(e){const t=this._getItems();if(!t.length)return;const s=t.findIndex(i=>i.getAttribute("tabindex")==="0"),r=i=>{const o=(i%t.length+t.length)%t.length;t.forEach(u=>u.setAttribute("tabindex","-1"));const a=t[o];a.setAttribute("tabindex","0"),a.focus()};switch(e.key){case"ArrowDown":case"ArrowRight":e.preventDefault(),r(s<0?0:s+1);break;case"ArrowUp":case"ArrowLeft":e.preventDefault(),r(s<0?0:s-1);break;case"Home":e.preventDefault(),r(0);break;case"End":e.preventDefault(),r(t.length-1);break}}render(){return v`
2
+ import{_ as f}from"../../vendor/preload-helper.js";import{a as h,n as p,b as v,i as m,x as b,t as g}from"../../vendor/vendor.js";import"./scb-list-item.js";import"../../vendor/vendor-material.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(r,s,i){try{customElements.get(r)||t(r,s,i)}catch(a){var o=String(a||"");if(o.indexOf("already been used")===-1&&o.indexOf("NotSupportedError")===-1)throw a}}}}catch{}})();var y=Object.defineProperty,w=Object.getOwnPropertyDescriptor,c=e=>{throw TypeError(e)},l=(e,t,r,s)=>{for(var i=s>1?void 0:s?w(t,r):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(s?a(t,r,i):a(i))||i);return s&&i&&y(t,r,i),i},_=(e,t,r)=>t.has(e)||c("Cannot "+r),E=(e,t,r)=>(_(e,t,"read from private field"),t.get(e)),A=(e,t,r)=>t.has(e)?c("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),k=(e,t,r,s)=>(_(e,t,"write to private field"),t.set(e,r),r),d;let n=class extends m{constructor(){super(...arguments),A(this,d,!1),this.noDivider=!1,this._onSlotChange=()=>this._setupItems()}async firstUpdated(){E(this,d)||(await f(()=>import("../../vendor/vendor-material.js").then(e=>e.l),__vite__mapDeps([0,1]),import.meta.url),k(this,d,!0)),this._setupItems()}_getItems(){return(this._slotEl?.assignedElements({flatten:!0})??[]).filter(t=>t instanceof HTMLElement)}_setupItems(){this._getItems().forEach((r,s)=>{r.hasAttribute("role")||r.setAttribute("role","listitem"),r.setAttribute("tabindex",s===0?"0":"-1")});const t=this.renderRoot?.querySelector("md-list");t&&!t.hasAttribute("data-kbd")&&(t.setAttribute("data-kbd","true"),t.addEventListener("keydown",r=>this._onKeyDown(r)))}_onKeyDown(e){const t=this._getItems();if(!t.length)return;const r=t.findIndex(i=>i.getAttribute("tabindex")==="0"),s=i=>{const o=(i%t.length+t.length)%t.length;t.forEach(u=>u.setAttribute("tabindex","-1"));const a=t[o];a.setAttribute("tabindex","0"),a.focus()};switch(e.key){case"ArrowDown":case"ArrowRight":e.preventDefault(),s(r<0?0:r+1);break;case"ArrowUp":case"ArrowLeft":e.preventDefault(),s(r<0?0:r-1);break;case"Home":e.preventDefault(),s(0);break;case"End":e.preventDefault(),s(t.length-1);break}}render(){return b`
3
3
  <md-list role="list" @slotchange=${this._onSlotChange}>
4
4
  <slot></slot>
5
5
  </md-list>
6
- `}};n=new WeakMap;l.styles=[h`
6
+ `}};d=new WeakMap;n.styles=[h`
7
7
  :host {
8
8
  display: block;
9
9
  --scb-list-bg: var(--md-sys-color-surface-container-lowest);
@@ -13,7 +13,14 @@ import{_ as f}from"../../vendor/preload-helper.js";import{a as h,b as p,i as m,x
13
13
  background: var(--scb-list-bg);
14
14
  }
15
15
 
16
- ::slotted(scb-list-item:first-of-type) {
16
+ /* Visa top-border på första raden endast när listan saknar no-divider
17
+ och endast om första item inte själv är markerad med no-divider. */
18
+ :host(:not([no-divider])) ::slotted(scb-list-item:first-of-type:not([no-divider])) {
17
19
  border-top: 1px solid var(--md-sys-color-outline-variant);
18
20
  }
19
- `];c([p("slot")],l.prototype,"_slotEl",2);l=c([b("scb-list")],l);
21
+
22
+ /* När listan har no-divider, tryck ned variabeln till alla barn */
23
+ :host([no-divider]) ::slotted(scb-list-item) {
24
+ --stroke-border: 0px;
25
+ }
26
+ `];l([p({type:Boolean,attribute:"no-divider",reflect:!0})],n.prototype,"noDivider",2);l([v("slot")],n.prototype,"_slotEl",2);n=l([g("scb-list")],n);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scb-wc-test",
3
- "version": "0.1.20",
3
+ "version": "0.1.22",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -277,5 +277,5 @@
277
277
  },
278
278
  "./mvc/*": "./mvc/*"
279
279
  },
280
- "buildHash": "F48586C40160F3B71A2B3B190449230BF39BFFE2C01FA750CD44A74D9A78BE2B"
280
+ "buildHash": "D27E7601EBCF8143663394290D72984E6AE3B85033B2B0CAEB0FFB1E11A495BA"
281
281
  }
@@ -1,8 +1,9 @@
1
- import { LitElement as u, css as b, html as p } from "lit";
2
- import { property as i, customElement as m } from "lit/decorators.js";
3
- var h = Object.defineProperty, f = Object.getOwnPropertyDescriptor, a = (l, t, o, s) => {
4
- for (var r = s > 1 ? void 0 : s ? f(t, o) : t, c = l.length - 1, n; c >= 0; c--)
5
- (n = l[c]) && (r = (s ? n(t, o, r) : n(r)) || r);
1
+ import { LitElement as u, css as b, html as l } from "lit";
2
+ import { property as n, customElement as m } from "lit/decorators.js";
3
+ import "../scb-link/scb-link.js";
4
+ var h = Object.defineProperty, f = Object.getOwnPropertyDescriptor, a = (p, t, o, s) => {
5
+ for (var r = s > 1 ? void 0 : s ? f(t, o) : t, c = p.length - 1, i; c >= 0; c--)
6
+ (i = p[c]) && (r = (s ? i(t, o, r) : i(r)) || r);
6
7
  return s && r && h(t, o, r), r;
7
8
  };
8
9
  let e = class extends u {
@@ -28,23 +29,23 @@ let e = class extends u {
28
29
  render() {
29
30
  switch (!0) {
30
31
  case this.isCurrent:
31
- return p`<span class="breadcrumb-current">${this.label}</span>`;
32
+ return l`<span class="breadcrumb-current">${this.label}</span>`;
32
33
  default:
33
- return p`
34
- <a href="${this.href}" class="breadcrumb-link">${this.label}</a>
34
+ return l`
35
+ <scb-link href="${this.href}">${this.label}</scb-link>
35
36
  <span class="breadcrumb-separator">/</span>
36
37
  `;
37
38
  }
38
39
  }
39
40
  };
40
41
  a([
41
- i({ type: String })
42
+ n({ type: String })
42
43
  ], e.prototype, "label", 2);
43
44
  a([
44
- i({ type: Boolean, attribute: "is-current" })
45
+ n({ type: Boolean, attribute: "is-current" })
45
46
  ], e.prototype, "isCurrent", 2);
46
47
  a([
47
- i({ type: String, attribute: "item-href" })
48
+ n({ type: String, attribute: "item-href" })
48
49
  ], e.prototype, "href", 2);
49
50
  e = a([
50
51
  m("scb-breadcrumb-item")
@@ -1,18 +1,19 @@
1
- import { LitElement as m, css as d, html as o } from "lit";
1
+ import { LitElement as d, css as m, html as o } from "lit";
2
2
  import { property as p, customElement as b } from "lit/decorators.js";
3
3
  import "./scb-breadcrumb-item.js";
4
4
  import "@material/web/icon/icon.js";
5
- var h = Object.defineProperty, u = Object.getOwnPropertyDescriptor, n = (s, r, e, l) => {
6
- for (var a = l > 1 ? void 0 : l ? u(r, e) : r, t = s.length - 1, i; t >= 0; t--)
7
- (i = s[t]) && (a = (l ? i(r, e, a) : i(a)) || a);
8
- return l && a && h(r, e, a), a;
5
+ import "@material/web/focus/md-focus-ring.js";
6
+ var u = Object.defineProperty, h = Object.getOwnPropertyDescriptor, c = (s, r, e, l) => {
7
+ for (var a = l > 1 ? void 0 : l ? h(r, e) : r, i = s.length - 1, t; i >= 0; i--)
8
+ (t = s[i]) && (a = (l ? t(r, e, a) : t(a)) || a);
9
+ return l && a && u(r, e, a), a;
9
10
  };
10
- let c = class extends m {
11
+ let n = class extends d {
11
12
  constructor() {
12
13
  super(...arguments), this.showAll = !1;
13
14
  }
14
15
  static get styles() {
15
- return d`
16
+ return m`
16
17
  .scb-breadcrumb {
17
18
  display: flex;
18
19
  align-items: center;
@@ -29,10 +30,14 @@ let c = class extends m {
29
30
  .collapsed > scb-breadcrumb-item:nth-last-child(-n+3) {
30
31
  display: inline-flex;
31
32
  }
33
+ .ellipsis:focus {
34
+ outline: none;
35
+ }
32
36
  .ellipsis {
33
37
  cursor: pointer;
34
38
  display: inline-flex;
35
39
  color: var(--md-sys-color-primary);
40
+ position: relative;
36
41
  }
37
42
  .collapsed .ellipsis {
38
43
  display: inline-flex;
@@ -45,6 +50,16 @@ let c = class extends m {
45
50
  transform: translateY(10px);
46
51
  animation: fadeInBreadcrumb 0.4s cubic-bezier(0.4,0,0.2,1) forwards;
47
52
  }
53
+ md-focus-ring {
54
+ position: absolute;
55
+ inset: 0;
56
+ pointer-events: none;
57
+ display: none;
58
+ border-radius: var(--scb-card-focus-ring-radius, var(--md-sys-shape-corner-large));
59
+ }
60
+ .ellipsis:focus md-focus-ring {
61
+ display: block;
62
+ }
48
63
  @keyframes fadeInBreadcrumb {
49
64
  to {
50
65
  opacity: 1;
@@ -82,18 +97,18 @@ let c = class extends m {
82
97
  @keydown=${(a) => {
83
98
  (a.key === "Enter" || a.key === " ") && this._onEllipsisClick();
84
99
  }}
85
- ><md-icon>more_horiz</md-icon></span><span class="breadcrumb-separator">/</span>${e}` : o`${e}`
100
+ ><md-icon><md-focus-ring></md-focus-ring>more_horiz</md-icon></span><span class="breadcrumb-separator">/</span>${e}` : o`${e}`
86
101
  ) : s.map((e) => e)}
87
102
  </div>
88
103
  `;
89
104
  }
90
105
  };
91
- n([
106
+ c([
92
107
  p({ type: Boolean })
93
- ], c.prototype, "showAll", 2);
94
- c = n([
108
+ ], n.prototype, "showAll", 2);
109
+ n = c([
95
110
  b("scb-breadcrumb")
96
- ], c);
111
+ ], n);
97
112
  export {
98
- c as SCBBreadcrumb
113
+ n as SCBBreadcrumb
99
114
  };
@@ -4,6 +4,7 @@ import "@material/web/icon/icon.js";
4
4
  import "@material/web/ripple/ripple.js";
5
5
  import "../scb-icon-button/scb-icon-button.js";
6
6
  import "./scb-fact-card-content.js";
7
+ import "../scb-link/scb-link.js";
7
8
  var f = Object.defineProperty, b = Object.getOwnPropertyDescriptor, i = (t, e, l, n) => {
8
9
  for (var r = n > 1 ? void 0 : n ? b(e, l) : e, c = t.length - 1, p; c >= 0; c--)
9
10
  (p = t[c]) && (r = (n ? p(e, l, r) : p(r)) || r);
@@ -1,15 +1,15 @@
1
- import { css as h, LitElement as v, html as u } from "lit";
1
+ import { css as h, LitElement as u, html as v } from "lit";
2
2
  import { property as s, customElement as b } from "lit/decorators.js";
3
3
  import { ifDefined as n } from "lit/directives/if-defined.js";
4
4
  import "@material/web/focus/md-focus-ring.js";
5
5
  var y = Object.defineProperty, m = Object.getOwnPropertyDescriptor, f = (e) => {
6
6
  throw TypeError(e);
7
- }, a = (e, r, t, l) => {
8
- for (var i = l > 1 ? void 0 : l ? m(r, t) : r, c = e.length - 1, d; c >= 0; c--)
9
- (d = e[c]) && (i = (l ? d(r, t, i) : d(i)) || i);
10
- return l && i && y(r, t, i), i;
11
- }, g = (e, r, t) => r.has(e) || f("Cannot " + t), k = (e, r, t) => (g(e, r, "read from private field"), t ? t.call(e) : r.get(e)), _ = (e, r, t) => r.has(e) ? f("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(e) : r.set(e, t), p;
12
- let o = class extends v {
7
+ }, a = (e, t, r, l) => {
8
+ for (var i = l > 1 ? void 0 : l ? m(t, r) : t, c = e.length - 1, d; c >= 0; c--)
9
+ (d = e[c]) && (i = (l ? d(t, r, i) : d(i)) || i);
10
+ return l && i && y(t, r, i), i;
11
+ }, g = (e, t, r) => t.has(e) || f("Cannot " + r), k = (e, t, r) => (g(e, t, "read from private field"), r ? r.call(e) : t.get(e)), _ = (e, t, r) => t.has(e) ? f("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), p;
12
+ let o = class extends u {
13
13
  constructor() {
14
14
  super(...arguments), this.href = "", this.disabled = !1, this.ariaLabel = "", _(this, p, (e) => {
15
15
  this.disabled && (e.preventDefault(), e.stopPropagation());
@@ -17,7 +17,7 @@ let o = class extends v {
17
17
  }
18
18
  render() {
19
19
  const e = this.target === "_blank" && !this.rel ? "noopener noreferrer" : this.rel;
20
- return u`
20
+ return v`
21
21
  <a
22
22
  part="anchor"
23
23
  href=${n(this.disabled ? void 0 : this.href || void 0)}
@@ -41,6 +41,7 @@ o.styles = h`
41
41
  padding: var(--scb-link-focus-ring-gap, 4px);
42
42
  font-family: var(--brand-font, inherit);
43
43
  color: var(--md-sys-color-on-surface);
44
+ width: fit-content;
44
45
  }
45
46
 
46
47
  md-focus-ring {
@@ -69,7 +70,6 @@ o.styles = h`
69
70
  }
70
71
  a:hover { text-decoration-thickness: var(--scb-link-hover-thickness, 2px); }
71
72
  a:focus { outline: none; }
72
- a:visited { color: var(--scb-link-visited-color, var(--md-sys-color-on-surface)); }
73
73
 
74
74
  :host([disabled]) a {
75
75
  pointer-events: none;
@@ -21,6 +21,7 @@ export declare class ScbListItem extends LitElement {
21
21
  trailingVariant: '' | 'icon' | 'checkbox' | 'switch';
22
22
  trailingIcon: string;
23
23
  density: -4 | -2 | 0;
24
+ noDivider: boolean;
24
25
  static get styles(): import('lit').CSSResult;
25
26
  protected firstUpdated(): Promise<void>;
26
27
  protected updated(changed: PropertyValues): void;
@@ -11,7 +11,7 @@ var I = Object.defineProperty, L = Object.getOwnPropertyDescriptor, _ = (t) => {
11
11
  }, w = (t, i, e) => i.has(t) || _("Cannot " + e), g = (t, i, e) => (w(t, i, "read from private field"), e ? e.call(t) : i.get(t)), h = (t, i, e) => i.has(t) ? _("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(t) : i.set(t, e), m = (t, i, e, n) => (w(t, i, "write to private field"), i.set(t, e), e), x = (t, i, e) => (w(t, i, "access private method"), e), y, f, u, v, b, k;
12
12
  let a = class extends S {
13
13
  constructor() {
14
- super(...arguments), h(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.density = 0, h(this, y, !1), h(this, f, !1), h(this, u, !1), this.onRowClick = () => {
14
+ super(...arguments), h(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.density = 0, this.noDivider = !1, h(this, y, !1), h(this, f, !1), h(this, u, !1), this.onRowClick = () => {
15
15
  var e, n;
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 = (n = this.shadowRoot) == null ? void 0 : n.querySelector("scb-switch");
@@ -41,6 +41,9 @@ let a = class extends S {
41
41
  font-family: var(--brand-font);
42
42
  }
43
43
 
44
+ /* Per-item: ingen divider när attributet är satt */
45
+ :host([no-divider]) { --stroke-border: 0px; }
46
+
44
47
  md-focus-ring {
45
48
  position: absolute;
46
49
  inset: 0;
@@ -125,11 +128,11 @@ let a = class extends S {
125
128
 
126
129
  :host([trailing-variant="checkbox"]) .row,
127
130
  :host([trailing-variant="switch"]) .row {
128
- cursor: pointer;
131
+ cursor: pointer;
129
132
  }
130
133
 
131
134
  :host([disabled]) .row {
132
- cursor: default;
135
+ cursor: default;
133
136
  }
134
137
 
135
138
  .link { text-decoration: none; color: inherit; display: contents; }
@@ -260,6 +263,9 @@ r([
260
263
  r([
261
264
  s({ type: Number, reflect: !0 })
262
265
  ], a.prototype, "density", 2);
266
+ r([
267
+ s({ type: Boolean, attribute: "no-divider", reflect: !0 })
268
+ ], a.prototype, "noDivider", 2);
263
269
  a = r([
264
270
  V("scb-list-item")
265
271
  ], a);
@@ -1,6 +1,7 @@
1
1
  import { LitElement, TemplateResult } from 'lit';
2
2
  export declare class ScbList extends LitElement {
3
3
  #private;
4
+ noDivider: boolean;
4
5
  private _slotEl;
5
6
  protected firstUpdated(): Promise<void>;
6
7
  private _onSlotChange;
@@ -10,3 +11,8 @@ export declare class ScbList extends LitElement {
10
11
  static styles: import('lit').CSSResult[];
11
12
  render(): TemplateResult;
12
13
  }
14
+ declare global {
15
+ interface HTMLElementTagNameMap {
16
+ 'scb-list': ScbList;
17
+ }
18
+ }