scb-wc-test 0.1.217 → 0.1.218

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{a as h,n as s,i as u,E as d,x as r,t as m}from"../../vendor/vendor.js";import"../scb-button/scb-button.js";import"../scb-icon-button/scb-icon-button.js";import"../scb-textfield/scb-textfield.js";import"../scb-checkbox/scb-checkbox.js";import"../scb-radio-button/scb-radio-button.js";import"../scb-switch/scb-switch.js";import"../scb-chip/scb-chip.js";import"../../vendor/vendor-material.js";import"../../vendor/preload-helper.js";import"../scb-datepicker/scb-datepicker.js";import"../scb-divider/scb-divider.js";import"../scb-checkbox/scb-checkbox-group.js";import"../scb-radio-button/scb-radio-group.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(o,c,a){try{customElements.get(o)||e(o,c,a)}catch(p){var l=String(p||"");if(l.indexOf("already been used")===-1&&l.indexOf("NotSupportedError")===-1)throw p}}}}catch{}})();var g=Object.defineProperty,b=Object.getOwnPropertyDescriptor,n=(t,e,o,c)=>{for(var a=c>1?void 0:c?b(e,o):e,l=t.length-1,p;l>=0;l--)(p=t[l])&&(a=(c?p(e,o,a):p(a))||a);return c&&a&&g(e,o,a),a};let i=class extends u{constructor(){super(...arguments),this.open=!1,this.inSb=!1,this.scrimClose=!0,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.variant="basic",this.label="",this.icon="",this.supportingText="",this.okButton="OK",this.cancelButton="Avbryt",this.deleteButton="Delete",this.confirmButton="Ta bort",this.denyButton="Avbryt",this.resetButton="Återställ",this.submitButton="Spara",this.formId="",this.formAction="",this.formMethod="",this.__lastTriggerEl=null,this.__onDocumentClick=t=>{this.__getActionFromEvent(t)==="toggle"&&(this.__setOpen(!this.open),t.stopPropagation())},this.__onDocumentKeydown=t=>{this.open&&t.key==="Escape"&&(this.__fire("esc"),this.__setOpen(!1))},this.__onScrimClick=()=>{this.scrimClose&&(this.__fire("scrim"),this.__setOpen(!1))},this.__onOk=()=>{this.__fire("ok"),this.__setOpen(!1)},this.__onCancel=()=>{this.__fire("cancel"),this.__setOpen(!1)},this.__onConfirm=()=>{this.__fire("confirm"),this.__setOpen(!1)},this.__onDeny=()=>{this.__fire("deny"),this.__setOpen(!1)},this.__onReset=()=>{this.shadowRoot?.querySelector("form")?.reset(),(this.shadowRoot?.querySelector("slot")?.assignedElements({flatten:!0})??[]).forEach(e=>{const o=e.tagName;o==="SCB-TEXTFIELD"&&(e.value=""),o==="SCB-CHECKBOX"&&(e.checked=!1),o==="SCB-RADIO-BUTTON"&&(e.checked=!1),o==="SCB-SWITCH"&&(e.selected=!1),o==="SCB-CHIP"&&(e.selected=!1)}),this.__fire("reset")},this.__onSubmit=()=>{this.shadowRoot?.querySelector("form")?.requestSubmit(),this.__fire("submit"),this.__setOpen(!1)},this.__onKeydownTrap=t=>{if(!this.open||t.key!=="Tab")return;const e=Array.from(this.shadowRoot.querySelectorAll('button,[href],input,select,textarea,[tabindex]:not([tabindex="-1"])')).filter(a=>!a.hasAttribute("disabled"));if(!e.length)return;const o=e[0],c=e[e.length-1];t.shiftKey&&document.activeElement===o?(c.focus(),t.preventDefault()):!t.shiftKey&&document.activeElement===c&&(o.focus(),t.preventDefault())}}__getActionFromEvent(t){if(!this.id)return null;for(const e of t.composedPath())if(e instanceof Element){if(e.getAttribute("data-dialog-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),document.addEventListener("keydown",this.__onDocumentKeydown,!0),this.addEventListener("keydown",this.__onKeydownTrap)}disconnectedCallback(){document.removeEventListener("click",this.__onDocumentClick,!1),document.removeEventListener("keydown",this.__onDocumentKeydown,!0),this.removeEventListener("keydown",this.__onKeydownTrap),super.disconnectedCallback()}updated(t){if(t.has("open")){const e=t.get("open");this.__updateTriggersExpanded(),this.open&&!e?this.updateComplete.then(()=>{const o=this.shadowRoot?.querySelector('button,[href],input,select,textarea,[tabindex]:not([tabindex="-1"])');o?o.focus():this.shadowRoot?.querySelector(".container")?.focus()}):!this.open&&e&&this.__lastTriggerEl?.focus?.(),this.__toggleScrollLock(this.open)}(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&this.__applySpacing()}__updateTriggersExpanded(){this.id&&document.querySelectorAll(`[aria-controls="${this.id}"], [data-dialog-toggle="${this.id}"]`).forEach(t=>{t.hasAttribute("aria-controls")&&t.setAttribute("aria-expanded",String(this.open))})}__toggleScrollLock(t){if(this.inSb)return;const e=document.documentElement;e.style.overflow=t?"hidden":""}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}__applySpacing(){const t=this.mapSpacingToken(this.spacing),e=this.mapSpacingToken(this.spacingTop)??t,o=this.mapSpacingToken(this.spacingBottom)??t,c=this.mapSpacingToken(this.spacingLeft),a=this.mapSpacingToken(this.spacingRight);e?this.style.setProperty("--scb-dialog-spacing-block-start",e):this.style.removeProperty("--scb-dialog-spacing-block-start"),o?this.style.setProperty("--scb-dialog-spacing-block-end",o):this.style.removeProperty("--scb-dialog-spacing-block-end"),c?this.style.setProperty("--scb-dialog-spacing-inline-start",c):this.style.removeProperty("--scb-dialog-spacing-inline-start"),a?this.style.setProperty("--scb-dialog-spacing-inline-end",a):this.style.removeProperty("--scb-dialog-spacing-inline-end")}__setOpen(t){this.open=t,this.__fire(t?"open":"close")}__fire(t,e){this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0}))}__slotIsEmpty(){const t=this.shadowRoot?.querySelector("slot");return t?t.assignedElements({flatten:!0}).length===0:!0}renderHeader(t){const e=this.variant==="form"||this.variant==="floating";return r`
1
+ import{a as h,n,i as u,E as d,x as r,t as m}from"../../vendor/vendor.js";import"../scb-button/scb-button.js";import"../scb-icon-button/scb-icon-button.js";import"../scb-textfield/scb-textfield.js";import"../scb-checkbox/scb-checkbox.js";import"../scb-radio-button/scb-radio-button.js";import"../scb-switch/scb-switch.js";import"../scb-chip/scb-chip.js";import"../../vendor/vendor-material.js";import"../../vendor/preload-helper.js";import"../scb-datepicker/scb-datepicker.js";import"../scb-divider/scb-divider.js";import"../scb-checkbox/scb-checkbox-group.js";import"../scb-radio-button/scb-radio-group.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,c,a){try{customElements.get(s)||e(s,c,a)}catch(p){var l=String(p||"");if(l.indexOf("already been used")===-1&&l.indexOf("NotSupportedError")===-1)throw p}}}}catch{}})();var g=Object.defineProperty,b=Object.getOwnPropertyDescriptor,o=(t,e,s,c)=>{for(var a=c>1?void 0:c?b(e,s):e,l=t.length-1,p;l>=0;l--)(p=t[l])&&(a=(c?p(e,s,a):p(a))||a);return c&&a&&g(e,s,a),a};let i=class extends u{constructor(){super(...arguments),this.open=!1,this.inSb=!1,this.scrimClose=!0,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.variant="basic",this.label="",this.icon="",this.supportingText="",this.okButton="OK",this.cancelButton="Avbryt",this.deleteButton="Delete",this.confirmButton="Ta bort",this.denyButton="Avbryt",this.resetButton="Återställ",this.submitButton="Spara",this.formId="",this.formAction="",this.formMethod="",this.__lastTriggerEl=null,this.__onDocumentClick=t=>{this.__getActionFromEvent(t)==="toggle"&&(this.__setOpen(!this.open),t.stopPropagation())},this.__onDocumentKeydown=t=>{this.open&&t.key==="Escape"&&(this.__fire("esc"),this.__setOpen(!1))},this.__onScrimClick=()=>{this.scrimClose&&(this.__fire("scrim"),this.__setOpen(!1))},this.__onOk=()=>{this.__fire("ok"),this.__setOpen(!1)},this.__onCancel=()=>{this.__fire("cancel"),this.__setOpen(!1)},this.__onConfirm=()=>{this.__fire("confirm"),this.__setOpen(!1)},this.__onDeny=()=>{this.__fire("deny"),this.__setOpen(!1)},this.__onReset=()=>{this.shadowRoot?.querySelector("form")?.reset(),(this.shadowRoot?.querySelector("slot")?.assignedElements({flatten:!0})??[]).forEach(e=>{const s=e.tagName;s==="SCB-TEXTFIELD"&&(e.value=""),s==="SCB-CHECKBOX"&&(e.checked=!1),s==="SCB-RADIO-BUTTON"&&(e.checked=!1),s==="SCB-SWITCH"&&(e.selected=!1),s==="SCB-CHIP"&&(e.selected=!1)}),this.__fire("reset")},this.__onSubmit=()=>{this.shadowRoot?.querySelector("form")?.requestSubmit(),this.__fire("submit"),this.__setOpen(!1)},this.__onKeydownTrap=t=>{if(!this.open||t.key!=="Tab")return;const e=Array.from(this.shadowRoot.querySelectorAll('button,[href],input,select,textarea,[tabindex]:not([tabindex="-1"])')).filter(a=>!a.hasAttribute("disabled"));if(!e.length)return;const s=e[0],c=e[e.length-1];t.shiftKey&&document.activeElement===s?(c.focus(),t.preventDefault()):!t.shiftKey&&document.activeElement===c&&(s.focus(),t.preventDefault())}}__getActionFromEvent(t){if(!this.id)return null;for(const e of t.composedPath())if(e instanceof Element){if(e.getAttribute("data-dialog-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(),this.__applyZIndex(),document.addEventListener("click",this.__onDocumentClick,!1),document.addEventListener("keydown",this.__onDocumentKeydown,!0),this.addEventListener("keydown",this.__onKeydownTrap)}disconnectedCallback(){document.removeEventListener("click",this.__onDocumentClick,!1),document.removeEventListener("keydown",this.__onDocumentKeydown,!0),this.removeEventListener("keydown",this.__onKeydownTrap),super.disconnectedCallback()}__applyZIndex(){const t=typeof this.zIndex=="number"&&Number.isFinite(this.zIndex)?this.zIndex:void 0;if(t===void 0){this.style.removeProperty("--z-dialog-scrim"),this.style.removeProperty("--z-dialog");return}this.style.setProperty("--z-dialog-scrim",String(t)),this.style.setProperty("--z-dialog",String(t+1))}updated(t){if(t.has("zIndex")&&this.__applyZIndex(),t.has("open")){const e=t.get("open");this.__updateTriggersExpanded(),this.open&&!e?this.updateComplete.then(()=>{const s=this.shadowRoot?.querySelector('button,[href],input,select,textarea,[tabindex]:not([tabindex="-1"])');s?s.focus():this.shadowRoot?.querySelector(".container")?.focus()}):!this.open&&e&&this.__lastTriggerEl?.focus?.(),this.__toggleScrollLock(this.open)}(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&this.__applySpacing()}__updateTriggersExpanded(){this.id&&document.querySelectorAll(`[aria-controls="${this.id}"], [data-dialog-toggle="${this.id}"]`).forEach(t=>{t.hasAttribute("aria-controls")&&t.setAttribute("aria-expanded",String(this.open))})}__toggleScrollLock(t){if(this.inSb)return;const e=document.documentElement;e.style.overflow=t?"hidden":""}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}__applySpacing(){const t=this.mapSpacingToken(this.spacing),e=this.mapSpacingToken(this.spacingTop)??t,s=this.mapSpacingToken(this.spacingBottom)??t,c=this.mapSpacingToken(this.spacingLeft),a=this.mapSpacingToken(this.spacingRight);e?this.style.setProperty("--scb-dialog-spacing-block-start",e):this.style.removeProperty("--scb-dialog-spacing-block-start"),s?this.style.setProperty("--scb-dialog-spacing-block-end",s):this.style.removeProperty("--scb-dialog-spacing-block-end"),c?this.style.setProperty("--scb-dialog-spacing-inline-start",c):this.style.removeProperty("--scb-dialog-spacing-inline-start"),a?this.style.setProperty("--scb-dialog-spacing-inline-end",a):this.style.removeProperty("--scb-dialog-spacing-inline-end")}__setOpen(t){this.open=t,this.__fire(t?"open":"close")}__fire(t,e){this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0}))}__slotIsEmpty(){const t=this.shadowRoot?.querySelector("slot");return t?t.assignedElements({flatten:!0}).length===0:!0}renderHeader(t){const e=this.variant==="form"||this.variant==="floating";return r`
2
2
  <div class="header">
3
3
  <div class="title">
4
4
  ${this.icon?r`<md-icon class="dialog-icon">${this.icon}</md-icon>`:d}
@@ -194,4 +194,4 @@ import{a as h,n as s,i as u,E as d,x as r,t as m}from"../../vendor/vendor.js";im
194
194
  to { opacity: 0; }
195
195
  }
196
196
 
197
- `;n([s({type:Boolean,reflect:!0})],i.prototype,"open",2);n([s({type:Boolean,attribute:!1})],i.prototype,"inSb",2);n([s({type:Boolean,attribute:"scrim-close"})],i.prototype,"scrimClose",2);n([s({type:String,reflect:!0})],i.prototype,"spacing",2);n([s({type:String,attribute:"spacing-top",reflect:!0})],i.prototype,"spacingTop",2);n([s({type:String,attribute:"spacing-bottom",reflect:!0})],i.prototype,"spacingBottom",2);n([s({type:String,attribute:"spacing-left",reflect:!0})],i.prototype,"spacingLeft",2);n([s({type:String,attribute:"spacing-right",reflect:!0})],i.prototype,"spacingRight",2);n([s({type:String})],i.prototype,"variant",2);n([s({type:String})],i.prototype,"label",2);n([s({type:String})],i.prototype,"icon",2);n([s({type:String,attribute:"supporting-text"})],i.prototype,"supportingText",2);n([s({type:String,attribute:"ok-button"})],i.prototype,"okButton",2);n([s({type:String,attribute:"cancel-button"})],i.prototype,"cancelButton",2);n([s({type:String,attribute:"delete-button"})],i.prototype,"deleteButton",2);n([s({type:String,attribute:"confirm-button"})],i.prototype,"confirmButton",2);n([s({type:String,attribute:"deny-button"})],i.prototype,"denyButton",2);n([s({type:String,attribute:"reset-button"})],i.prototype,"resetButton",2);n([s({type:String,attribute:"submit-button"})],i.prototype,"submitButton",2);n([s({type:String,attribute:"form-id"})],i.prototype,"formId",2);n([s({type:String,attribute:"form-action"})],i.prototype,"formAction",2);n([s({type:String,attribute:"form-method"})],i.prototype,"formMethod",2);i=n([m("scb-dialog")],i);
197
+ `;o([n({type:Boolean,reflect:!0})],i.prototype,"open",2);o([n({type:Number,attribute:"z-index"})],i.prototype,"zIndex",2);o([n({type:Boolean,attribute:!1})],i.prototype,"inSb",2);o([n({type:Boolean,attribute:"scrim-close"})],i.prototype,"scrimClose",2);o([n({type:String,reflect:!0})],i.prototype,"spacing",2);o([n({type:String,attribute:"spacing-top",reflect:!0})],i.prototype,"spacingTop",2);o([n({type:String,attribute:"spacing-bottom",reflect:!0})],i.prototype,"spacingBottom",2);o([n({type:String,attribute:"spacing-left",reflect:!0})],i.prototype,"spacingLeft",2);o([n({type:String,attribute:"spacing-right",reflect:!0})],i.prototype,"spacingRight",2);o([n({type:String})],i.prototype,"variant",2);o([n({type:String})],i.prototype,"label",2);o([n({type:String})],i.prototype,"icon",2);o([n({type:String,attribute:"supporting-text"})],i.prototype,"supportingText",2);o([n({type:String,attribute:"ok-button"})],i.prototype,"okButton",2);o([n({type:String,attribute:"cancel-button"})],i.prototype,"cancelButton",2);o([n({type:String,attribute:"delete-button"})],i.prototype,"deleteButton",2);o([n({type:String,attribute:"confirm-button"})],i.prototype,"confirmButton",2);o([n({type:String,attribute:"deny-button"})],i.prototype,"denyButton",2);o([n({type:String,attribute:"reset-button"})],i.prototype,"resetButton",2);o([n({type:String,attribute:"submit-button"})],i.prototype,"submitButton",2);o([n({type:String,attribute:"form-id"})],i.prototype,"formId",2);o([n({type:String,attribute:"form-action"})],i.prototype,"formAction",2);o([n({type:String,attribute:"form-method"})],i.prototype,"formMethod",2);i=o([m("scb-dialog")],i);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scb-wc-test",
3
- "version": "0.1.217",
3
+ "version": "0.1.218",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -378,5 +378,5 @@
378
378
  },
379
379
  "./mvc/*": "./mvc/*"
380
380
  },
381
- "buildHash": "7D543E5C712B1CC0E3D0111E2D4EB384ECFD116C990055DCCB9D1B05A662F6F7"
381
+ "buildHash": "10FD3A49204B8DF6935EBCFC41E5C3F8AF1EAB602F7DC8FD6875FF995EBF6AF9"
382
382
  }
@@ -3,6 +3,7 @@ type Variant = 'basic' | 'alert' | 'confirm' | 'choose' | 'form' | 'floating';
3
3
  type FormMethod = '' | 'GET' | 'POST' | 'PUT' | 'DELETE';
4
4
  export declare class ScbDialog extends LitElement {
5
5
  open: boolean;
6
+ zIndex?: number;
6
7
  inSb: boolean;
7
8
  scrimClose: boolean;
8
9
  spacing: undefined;
@@ -31,6 +32,7 @@ export declare class ScbDialog extends LitElement {
31
32
  private __onDocumentKeydown;
32
33
  connectedCallback(): void;
33
34
  disconnectedCallback(): void;
35
+ private __applyZIndex;
34
36
  protected updated(ch: Map<string, unknown>): void;
35
37
  private __updateTriggersExpanded;
36
38
  private __toggleScrollLock;
@@ -1,5 +1,5 @@
1
- import { css as u, LitElement as g, nothing as d, html as c } from "lit";
2
- import { property as n, customElement as m } from "lit/decorators.js";
1
+ import { css as u, LitElement as m, nothing as d, html as c } from "lit";
2
+ import { property as s, customElement as g } from "lit/decorators.js";
3
3
  import "../scb-button/scb-button.js";
4
4
  import "../scb-icon-button/scb-icon-button.js";
5
5
  import "../scb-textfield/scb-textfield.js";
@@ -9,11 +9,11 @@ import "../scb-switch/scb-switch.js";
9
9
  import "../scb-chip/scb-chip.js";
10
10
  import "@material/web/icon/icon.js";
11
11
  var b = Object.defineProperty, f = Object.getOwnPropertyDescriptor, o = (t, e, a, r) => {
12
- for (var s = r > 1 ? void 0 : r ? f(e, a) : e, l = t.length - 1, p; l >= 0; l--)
13
- (p = t[l]) && (s = (r ? p(e, a, s) : p(s)) || s);
14
- return r && s && b(e, a, s), s;
12
+ for (var n = r > 1 ? void 0 : r ? f(e, a) : e, l = t.length - 1, p; l >= 0; l--)
13
+ (p = t[l]) && (n = (r ? p(e, a, n) : p(n)) || n);
14
+ return r && n && b(e, a, n), n;
15
15
  };
16
- let i = class extends g {
16
+ let i = class extends m {
17
17
  constructor() {
18
18
  super(...arguments), this.open = !1, this.inSb = !1, this.scrimClose = !0, this.spacing = void 0, this.spacingTop = void 0, this.spacingBottom = void 0, this.spacingLeft = void 0, this.spacingRight = void 0, this.variant = "basic", this.label = "", this.icon = "", this.supportingText = "", this.okButton = "OK", this.cancelButton = "Avbryt", this.deleteButton = "Delete", this.confirmButton = "Ta bort", this.denyButton = "Avbryt", this.resetButton = "Återställ", this.submitButton = "Spara", this.formId = "", this.formAction = "", this.formMethod = "", this.__lastTriggerEl = null, this.__onDocumentClick = (t) => {
19
19
  this.__getActionFromEvent(t) === "toggle" && (this.__setOpen(!this.open), t.stopPropagation());
@@ -30,8 +30,8 @@ let i = class extends g {
30
30
  }, this.__onDeny = () => {
31
31
  this.__fire("deny"), this.__setOpen(!1);
32
32
  }, this.__onReset = () => {
33
- var e, a, r, s;
34
- (a = (e = this.shadowRoot) == null ? void 0 : e.querySelector("form")) == null || a.reset(), (((s = (r = this.shadowRoot) == null ? void 0 : r.querySelector("slot")) == null ? void 0 : s.assignedElements({ flatten: !0 })) ?? []).forEach((l) => {
33
+ var e, a, r, n;
34
+ (a = (e = this.shadowRoot) == null ? void 0 : e.querySelector("form")) == null || a.reset(), (((n = (r = this.shadowRoot) == null ? void 0 : r.querySelector("slot")) == null ? void 0 : n.assignedElements({ flatten: !0 })) ?? []).forEach((l) => {
35
35
  const p = l.tagName;
36
36
  p === "SCB-TEXTFIELD" && (l.value = ""), p === "SCB-CHECKBOX" && (l.checked = !1), p === "SCB-RADIO-BUTTON" && (l.checked = !1), p === "SCB-SWITCH" && (l.selected = !1), p === "SCB-CHIP" && (l.selected = !1);
37
37
  }), this.__fire("reset");
@@ -44,7 +44,7 @@ let i = class extends g {
44
44
  this.shadowRoot.querySelectorAll(
45
45
  'button,[href],input,select,textarea,[tabindex]:not([tabindex="-1"])'
46
46
  )
47
- ).filter((s) => !s.hasAttribute("disabled"));
47
+ ).filter((n) => !n.hasAttribute("disabled"));
48
48
  if (!e.length) return;
49
49
  const a = e[0], r = e[e.length - 1];
50
50
  t.shiftKey && document.activeElement === a ? (r.focus(), t.preventDefault()) : !t.shiftKey && document.activeElement === r && (a.focus(), t.preventDefault());
@@ -68,7 +68,7 @@ let i = class extends g {
68
68
  }
69
69
  /* Koppla in global listeners (klick/tangentbord) och focus trap. */
70
70
  connectedCallback() {
71
- super.connectedCallback(), document.addEventListener("click", this.__onDocumentClick, !1), document.addEventListener("keydown", this.__onDocumentKeydown, !0), this.addEventListener("keydown", this.__onKeydownTrap);
71
+ super.connectedCallback(), this.__applyZIndex(), document.addEventListener("click", this.__onDocumentClick, !1), document.addEventListener("keydown", this.__onDocumentKeydown, !0), this.addEventListener("keydown", this.__onKeydownTrap);
72
72
  }
73
73
  disconnectedCallback() {
74
74
  document.removeEventListener("click", this.__onDocumentClick, !1), document.removeEventListener("keydown", this.__onDocumentKeydown, !0), this.removeEventListener("keydown", this.__onKeydownTrap), super.disconnectedCallback();
@@ -79,16 +79,24 @@ let i = class extends g {
79
79
  – återställ fokus till triggern när den stängs
80
80
  – lås/lås upp sid-scroll (inte i SB-läge)
81
81
  */
82
+ __applyZIndex() {
83
+ const t = typeof this.zIndex == "number" && Number.isFinite(this.zIndex) ? this.zIndex : void 0;
84
+ if (t === void 0) {
85
+ this.style.removeProperty("--z-dialog-scrim"), this.style.removeProperty("--z-dialog");
86
+ return;
87
+ }
88
+ this.style.setProperty("--z-dialog-scrim", String(t)), this.style.setProperty("--z-dialog", String(t + 1));
89
+ }
82
90
  updated(t) {
83
91
  var e, a;
84
- if (t.has("open")) {
92
+ if (t.has("zIndex") && this.__applyZIndex(), t.has("open")) {
85
93
  const r = t.get("open");
86
94
  this.__updateTriggersExpanded(), this.open && !r ? this.updateComplete.then(() => {
87
95
  var l, p, h;
88
- const s = (l = this.shadowRoot) == null ? void 0 : l.querySelector(
96
+ const n = (l = this.shadowRoot) == null ? void 0 : l.querySelector(
89
97
  'button,[href],input,select,textarea,[tabindex]:not([tabindex="-1"])'
90
98
  );
91
- s ? s.focus() : (h = (p = this.shadowRoot) == null ? void 0 : p.querySelector(".container")) == null || h.focus();
99
+ n ? n.focus() : (h = (p = this.shadowRoot) == null ? void 0 : p.querySelector(".container")) == null || h.focus();
92
100
  }) : !this.open && r && ((a = (e = this.__lastTriggerEl) == null ? void 0 : e.focus) == null || a.call(e)), this.__toggleScrollLock(this.open);
93
101
  }
94
102
  (t.has("spacing") || t.has("spacingTop") || t.has("spacingBottom") || t.has("spacingLeft") || t.has("spacingRight")) && this.__applySpacing();
@@ -112,8 +120,8 @@ let i = class extends g {
112
120
  return /^\d+$/.test(e) ? `var(--spacing-${Math.max(0, Math.min(14, parseInt(e, 10)))})` : e;
113
121
  }
114
122
  __applySpacing() {
115
- const t = this.mapSpacingToken(this.spacing), e = this.mapSpacingToken(this.spacingTop) ?? t, a = this.mapSpacingToken(this.spacingBottom) ?? t, r = this.mapSpacingToken(this.spacingLeft), s = this.mapSpacingToken(this.spacingRight);
116
- e ? this.style.setProperty("--scb-dialog-spacing-block-start", e) : this.style.removeProperty("--scb-dialog-spacing-block-start"), a ? this.style.setProperty("--scb-dialog-spacing-block-end", a) : this.style.removeProperty("--scb-dialog-spacing-block-end"), r ? this.style.setProperty("--scb-dialog-spacing-inline-start", r) : this.style.removeProperty("--scb-dialog-spacing-inline-start"), s ? this.style.setProperty("--scb-dialog-spacing-inline-end", s) : this.style.removeProperty("--scb-dialog-spacing-inline-end");
123
+ const t = this.mapSpacingToken(this.spacing), e = this.mapSpacingToken(this.spacingTop) ?? t, a = this.mapSpacingToken(this.spacingBottom) ?? t, r = this.mapSpacingToken(this.spacingLeft), n = this.mapSpacingToken(this.spacingRight);
124
+ e ? this.style.setProperty("--scb-dialog-spacing-block-start", e) : this.style.removeProperty("--scb-dialog-spacing-block-start"), a ? this.style.setProperty("--scb-dialog-spacing-block-end", a) : this.style.removeProperty("--scb-dialog-spacing-block-end"), r ? this.style.setProperty("--scb-dialog-spacing-inline-start", r) : this.style.removeProperty("--scb-dialog-spacing-inline-start"), n ? this.style.setProperty("--scb-dialog-spacing-inline-end", n) : this.style.removeProperty("--scb-dialog-spacing-inline-end");
117
125
  }
118
126
  /* Helpers för att byta state och fire events på ett ställe. */
119
127
  __setOpen(t) {
@@ -364,73 +372,76 @@ i.styles = u`
364
372
 
365
373
  `;
366
374
  o([
367
- n({ type: Boolean, reflect: !0 })
375
+ s({ type: Boolean, reflect: !0 })
368
376
  ], i.prototype, "open", 2);
369
377
  o([
370
- n({ type: Boolean, attribute: !1 })
378
+ s({ type: Number, attribute: "z-index" })
379
+ ], i.prototype, "zIndex", 2);
380
+ o([
381
+ s({ type: Boolean, attribute: !1 })
371
382
  ], i.prototype, "inSb", 2);
372
383
  o([
373
- n({ type: Boolean, attribute: "scrim-close" })
384
+ s({ type: Boolean, attribute: "scrim-close" })
374
385
  ], i.prototype, "scrimClose", 2);
375
386
  o([
376
- n({ type: String, reflect: !0 })
387
+ s({ type: String, reflect: !0 })
377
388
  ], i.prototype, "spacing", 2);
378
389
  o([
379
- n({ type: String, attribute: "spacing-top", reflect: !0 })
390
+ s({ type: String, attribute: "spacing-top", reflect: !0 })
380
391
  ], i.prototype, "spacingTop", 2);
381
392
  o([
382
- n({ type: String, attribute: "spacing-bottom", reflect: !0 })
393
+ s({ type: String, attribute: "spacing-bottom", reflect: !0 })
383
394
  ], i.prototype, "spacingBottom", 2);
384
395
  o([
385
- n({ type: String, attribute: "spacing-left", reflect: !0 })
396
+ s({ type: String, attribute: "spacing-left", reflect: !0 })
386
397
  ], i.prototype, "spacingLeft", 2);
387
398
  o([
388
- n({ type: String, attribute: "spacing-right", reflect: !0 })
399
+ s({ type: String, attribute: "spacing-right", reflect: !0 })
389
400
  ], i.prototype, "spacingRight", 2);
390
401
  o([
391
- n({ type: String })
402
+ s({ type: String })
392
403
  ], i.prototype, "variant", 2);
393
404
  o([
394
- n({ type: String })
405
+ s({ type: String })
395
406
  ], i.prototype, "label", 2);
396
407
  o([
397
- n({ type: String })
408
+ s({ type: String })
398
409
  ], i.prototype, "icon", 2);
399
410
  o([
400
- n({ type: String, attribute: "supporting-text" })
411
+ s({ type: String, attribute: "supporting-text" })
401
412
  ], i.prototype, "supportingText", 2);
402
413
  o([
403
- n({ type: String, attribute: "ok-button" })
414
+ s({ type: String, attribute: "ok-button" })
404
415
  ], i.prototype, "okButton", 2);
405
416
  o([
406
- n({ type: String, attribute: "cancel-button" })
417
+ s({ type: String, attribute: "cancel-button" })
407
418
  ], i.prototype, "cancelButton", 2);
408
419
  o([
409
- n({ type: String, attribute: "delete-button" })
420
+ s({ type: String, attribute: "delete-button" })
410
421
  ], i.prototype, "deleteButton", 2);
411
422
  o([
412
- n({ type: String, attribute: "confirm-button" })
423
+ s({ type: String, attribute: "confirm-button" })
413
424
  ], i.prototype, "confirmButton", 2);
414
425
  o([
415
- n({ type: String, attribute: "deny-button" })
426
+ s({ type: String, attribute: "deny-button" })
416
427
  ], i.prototype, "denyButton", 2);
417
428
  o([
418
- n({ type: String, attribute: "reset-button" })
429
+ s({ type: String, attribute: "reset-button" })
419
430
  ], i.prototype, "resetButton", 2);
420
431
  o([
421
- n({ type: String, attribute: "submit-button" })
432
+ s({ type: String, attribute: "submit-button" })
422
433
  ], i.prototype, "submitButton", 2);
423
434
  o([
424
- n({ type: String, attribute: "form-id" })
435
+ s({ type: String, attribute: "form-id" })
425
436
  ], i.prototype, "formId", 2);
426
437
  o([
427
- n({ type: String, attribute: "form-action" })
438
+ s({ type: String, attribute: "form-action" })
428
439
  ], i.prototype, "formAction", 2);
429
440
  o([
430
- n({ type: String, attribute: "form-method" })
441
+ s({ type: String, attribute: "form-method" })
431
442
  ], i.prototype, "formMethod", 2);
432
443
  i = o([
433
- m("scb-dialog")
444
+ g("scb-dialog")
434
445
  ], i);
435
446
  export {
436
447
  i as ScbDialog
@@ -619,7 +619,7 @@
619
619
  * @license
620
620
  * Copyright 2021 Google LLC
621
621
  * SPDX-License-Identifier: Apache-2.0
622
- */class Z extends y{constructor(){super(...arguments),this.disabled=!1,this.error=!1,this.focused=!1,this.label="",this.noAsterisk=!1,this.populated=!1,this.required=!1,this.resizable=!1,this.supportingText="",this.errorText="",this.count=-1,this.max=-1,this.hasStart=!1,this.hasEnd=!1,this.isAnimating=!1,this.refreshErrorAlert=!1,this.disableTransitions=!1}get counterText(){const e=this.count??-1,i=this.max??-1;return e<0||i<=0?"":`${e} / ${i}`}get supportingOrErrorText(){return this.error&&this.errorText?this.errorText:this.supportingText}reannounceError(){this.refreshErrorAlert=!0}update(e){e.has("disabled")&&e.get("disabled")!==void 0&&(this.disableTransitions=!0),this.disabled&&this.focused&&(e.set("focused",!0),this.focused=!1),this.animateLabelIfNeeded({wasFocused:e.get("focused"),wasPopulated:e.get("populated")}),super.update(e)}render(){var o,n,l;const e=this.renderLabel(!0),i=this.renderLabel(!1),r=(o=this.renderOutline)==null?void 0:o.call(this,e),s={disabled:this.disabled,"disable-transitions":this.disableTransitions,error:this.error&&!this.disabled,focused:this.focused,"with-start":this.hasStart,"with-end":this.hasEnd,populated:this.populated,resizable:this.resizable,required:this.required,"no-label":!this.label};return c`
622
+ */class Q extends y{constructor(){super(...arguments),this.disabled=!1,this.error=!1,this.focused=!1,this.label="",this.noAsterisk=!1,this.populated=!1,this.required=!1,this.resizable=!1,this.supportingText="",this.errorText="",this.count=-1,this.max=-1,this.hasStart=!1,this.hasEnd=!1,this.isAnimating=!1,this.refreshErrorAlert=!1,this.disableTransitions=!1}get counterText(){const e=this.count??-1,i=this.max??-1;return e<0||i<=0?"":`${e} / ${i}`}get supportingOrErrorText(){return this.error&&this.errorText?this.errorText:this.supportingText}reannounceError(){this.refreshErrorAlert=!0}update(e){e.has("disabled")&&e.get("disabled")!==void 0&&(this.disableTransitions=!0),this.disabled&&this.focused&&(e.set("focused",!0),this.focused=!1),this.animateLabelIfNeeded({wasFocused:e.get("focused"),wasPopulated:e.get("populated")}),super.update(e)}render(){var o,n,l;const e=this.renderLabel(!0),i=this.renderLabel(!1),r=(o=this.renderOutline)==null?void 0:o.call(this,e),s={disabled:this.disabled,"disable-transitions":this.disableTransitions,error:this.error&&!this.disabled,focused:this.focused,"with-start":this.hasStart,"with-end":this.hasEnd,populated:this.populated,resizable:this.resizable,required:this.required,"no-label":!this.label};return c`
623
623
  <div class="field ${G(s)}">
624
624
  <div class="container-overflow">
625
625
  ${(n=this.renderBackground)==null?void 0:n.call(this)} ${(l=this.renderIndicator)==null?void 0:l.call(this)} ${r}
@@ -651,11 +651,11 @@
651
651
  <span class="label ${G(r)}" aria-hidden=${!i}
652
652
  >${s}</span
653
653
  >
654
- `}animateLabelIfNeeded({wasFocused:e,wasPopulated:i}){var o,n,l;if(!this.label)return;e??(e=this.focused),i??(i=this.populated);const r=e||i,s=this.focused||this.populated;r!==s&&(this.isAnimating=!0,(o=this.labelAnimation)==null||o.cancel(),this.labelAnimation=(n=this.floatingLabelEl)==null?void 0:n.animate(this.getLabelKeyframes(),{duration:150,easing:Vt.STANDARD}),(l=this.labelAnimation)==null||l.addEventListener("finish",()=>{this.isAnimating=!1}))}getLabelKeyframes(){const{floatingLabelEl:e,restingLabelEl:i}=this;if(!e||!i)return[];const{x:r,y:s,height:o}=e.getBoundingClientRect(),{x:n,y:l,height:d}=i.getBoundingClientRect(),u=e.scrollWidth,v=i.scrollWidth,b=v/u,m=n-r,_=l-s+Math.round((d-o*b)/2),x=`translateX(${m}px) translateY(${_}px) scale(${b})`,w="translateX(0) translateY(0) scale(1)",S=i.clientWidth,k=v>S?`${S/b}px`:"";return this.focused||this.populated?[{transform:x,width:k},{transform:w,width:k}]:[{transform:w,width:k},{transform:x,width:k}]}getSurfacePositionClientRect(){return this.containerEl.getBoundingClientRect()}}p([a({type:Boolean})],Z.prototype,"disabled",void 0),p([a({type:Boolean})],Z.prototype,"error",void 0),p([a({type:Boolean})],Z.prototype,"focused",void 0),p([a()],Z.prototype,"label",void 0),p([a({type:Boolean,attribute:"no-asterisk"})],Z.prototype,"noAsterisk",void 0),p([a({type:Boolean})],Z.prototype,"populated",void 0),p([a({type:Boolean})],Z.prototype,"required",void 0),p([a({type:Boolean})],Z.prototype,"resizable",void 0),p([a({attribute:"supporting-text"})],Z.prototype,"supportingText",void 0),p([a({attribute:"error-text"})],Z.prototype,"errorText",void 0),p([a({type:Number})],Z.prototype,"count",void 0),p([a({type:Number})],Z.prototype,"max",void 0),p([a({type:Boolean,attribute:"has-start"})],Z.prototype,"hasStart",void 0),p([a({type:Boolean,attribute:"has-end"})],Z.prototype,"hasEnd",void 0),p([Le({slot:"aria-describedby"})],Z.prototype,"slottedAriaDescribedBy",void 0),p([A()],Z.prototype,"isAnimating",void 0),p([A()],Z.prototype,"refreshErrorAlert",void 0),p([A()],Z.prototype,"disableTransitions",void 0),p([I(".label.floating")],Z.prototype,"floatingLabelEl",void 0),p([I(".label.resting")],Z.prototype,"restingLabelEl",void 0),p([I(".container")],Z.prototype,"containerEl",void 0);/**
654
+ `}animateLabelIfNeeded({wasFocused:e,wasPopulated:i}){var o,n,l;if(!this.label)return;e??(e=this.focused),i??(i=this.populated);const r=e||i,s=this.focused||this.populated;r!==s&&(this.isAnimating=!0,(o=this.labelAnimation)==null||o.cancel(),this.labelAnimation=(n=this.floatingLabelEl)==null?void 0:n.animate(this.getLabelKeyframes(),{duration:150,easing:Vt.STANDARD}),(l=this.labelAnimation)==null||l.addEventListener("finish",()=>{this.isAnimating=!1}))}getLabelKeyframes(){const{floatingLabelEl:e,restingLabelEl:i}=this;if(!e||!i)return[];const{x:r,y:s,height:o}=e.getBoundingClientRect(),{x:n,y:l,height:d}=i.getBoundingClientRect(),u=e.scrollWidth,v=i.scrollWidth,b=v/u,m=n-r,_=l-s+Math.round((d-o*b)/2),x=`translateX(${m}px) translateY(${_}px) scale(${b})`,w="translateX(0) translateY(0) scale(1)",S=i.clientWidth,k=v>S?`${S/b}px`:"";return this.focused||this.populated?[{transform:x,width:k},{transform:w,width:k}]:[{transform:w,width:k},{transform:x,width:k}]}getSurfacePositionClientRect(){return this.containerEl.getBoundingClientRect()}}p([a({type:Boolean})],Q.prototype,"disabled",void 0),p([a({type:Boolean})],Q.prototype,"error",void 0),p([a({type:Boolean})],Q.prototype,"focused",void 0),p([a()],Q.prototype,"label",void 0),p([a({type:Boolean,attribute:"no-asterisk"})],Q.prototype,"noAsterisk",void 0),p([a({type:Boolean})],Q.prototype,"populated",void 0),p([a({type:Boolean})],Q.prototype,"required",void 0),p([a({type:Boolean})],Q.prototype,"resizable",void 0),p([a({attribute:"supporting-text"})],Q.prototype,"supportingText",void 0),p([a({attribute:"error-text"})],Q.prototype,"errorText",void 0),p([a({type:Number})],Q.prototype,"count",void 0),p([a({type:Number})],Q.prototype,"max",void 0),p([a({type:Boolean,attribute:"has-start"})],Q.prototype,"hasStart",void 0),p([a({type:Boolean,attribute:"has-end"})],Q.prototype,"hasEnd",void 0),p([Le({slot:"aria-describedby"})],Q.prototype,"slottedAriaDescribedBy",void 0),p([A()],Q.prototype,"isAnimating",void 0),p([A()],Q.prototype,"refreshErrorAlert",void 0),p([A()],Q.prototype,"disableTransitions",void 0),p([I(".label.floating")],Q.prototype,"floatingLabelEl",void 0),p([I(".label.resting")],Q.prototype,"restingLabelEl",void 0),p([I(".container")],Q.prototype,"containerEl",void 0);/**
655
655
  * @license
656
656
  * Copyright 2021 Google LLC
657
657
  * SPDX-License-Identifier: Apache-2.0
658
- */class Gh extends Z{renderBackground(){return c`
658
+ */class Gh extends Q{renderBackground(){return c`
659
659
  <div class="background"></div>
660
660
  <div class="state-layer"></div>
661
661
  `}renderIndicator(){return c`<div class="active-indicator"></div>`}}/**
@@ -676,7 +676,7 @@
676
676
  * @license
677
677
  * Copyright 2021 Google LLC
678
678
  * SPDX-License-Identifier: Apache-2.0
679
- */class Xh extends Z{renderOutline(e){return c`
679
+ */class Xh extends Q{renderOutline(e){return c`
680
680
  <div class="outline">
681
681
  <div class="outline-start"></div>
682
682
  <div class="outline-notch">
@@ -2326,7 +2326,7 @@
2326
2326
  md-filled-tonal-icon-button::part(button) {
2327
2327
  border-radius: var(--scb-icon-button-shape-radius) !important;
2328
2328
  }
2329
- `,ne([a({type:String})],Y.prototype,"icon",2),ne([a({type:Boolean,reflect:!0})],Y.prototype,"filled",1),ne([a({type:Boolean,attribute:"icon-filled",reflect:!0})],Y.prototype,"iconFilled",1),ne([a({type:String,attribute:"aria-label"})],Y.prototype,"ariaLabel",2),ne([a({type:String})],Y.prototype,"variant",2),ne([a({type:String,reflect:!0})],Y.prototype,"size",2),ne([a({type:String,reflect:!0})],Y.prototype,"shape",2),ne([a({type:Boolean,reflect:!0})],Y.prototype,"toggle",2),ne([a({type:Boolean,reflect:!0})],Y.prototype,"selected",2),ne([a({type:String})],Y.prototype,"toggleofficon",2),ne([a({type:String})],Y.prototype,"toggleonicon",2),ne([a({type:Boolean,reflect:!0})],Y.prototype,"disabled",2),ne([a({type:String,reflect:!0})],Y.prototype,"spacing",2),ne([a({type:String,attribute:"spacing-top",reflect:!0})],Y.prototype,"spacingTop",2),ne([a({type:String,attribute:"spacing-bottom",reflect:!0})],Y.prototype,"spacingBottom",2),ne([a({type:String,attribute:"spacing-left",reflect:!0})],Y.prototype,"spacingLeft",2),ne([a({type:String,attribute:"spacing-right",reflect:!0})],Y.prototype,"spacingRight",2),ne([a({type:String})],Y.prototype,"href",2),ne([a({type:String})],Y.prototype,"target",2),ne([a({type:String})],Y.prototype,"rel",2),Y=ne([g("scb-icon-button")],Y);const Mv=Object.freeze(Object.defineProperty({__proto__:null,get ScbIconButton(){return Y}},Symbol.toStringTag,{value:"Module"}));var Dv=Object.defineProperty,Bv=Object.getOwnPropertyDescriptor,ud=t=>{throw TypeError(t)},se=(t,e,i,r)=>{for(var s=r>1?void 0:r?Bv(e,i):e,o=t.length-1,n;o>=0;o--)(n=t[o])&&(s=(r?n(e,i,s):n(s))||s);return r&&s&&Dv(e,i,s),s},Kn=(t,e,i)=>e.has(t)||ud("Cannot "+i),Wo=(t,e,i)=>(Kn(t,e,"read from private field"),i?i.call(t):e.get(t)),Fs=(t,e,i)=>e.has(t)?ud("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),Gn=(t,e,i,r)=>(Kn(t,e,"write to private field"),e.set(t,i),i),vd=(t,e,i)=>(Kn(t,e,"access private method"),i),Uo,jo,Ko,Go,Yn,Xn;let Q=class extends y{constructor(){super(...arguments),Fs(this,Go),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,Fs(this,Uo,!1),Fs(this,jo,!1),Fs(this,Ko,!1),this.onRowClick=()=>{var i,r;if(this.type==="link"&&(this.href||this.itemHref))return;const t=(i=this.shadowRoot)==null?void 0:i.querySelector("scb-checkbox"),e=(r=this.shadowRoot)==null?void 0:r.querySelector("scb-switch");t&&(t.checked=!t.checked),e&&(e.selected=!e.selected)},Fs(this,Xn,t=>{var e;if(!t.defaultPrevented&&(t.key==="Enter"||t.key===" ")){if(this.type==="link"){const i=(e=this.shadowRoot)==null?void 0:e.querySelector("a[href]");if(i){t.preventDefault(),i.click();return}}t.preventDefault(),this.onRowClick()}})}static get styles(){return f`
2329
+ `,ne([a({type:String})],Y.prototype,"icon",2),ne([a({type:Boolean,reflect:!0})],Y.prototype,"filled",1),ne([a({type:Boolean,attribute:"icon-filled",reflect:!0})],Y.prototype,"iconFilled",1),ne([a({type:String,attribute:"aria-label"})],Y.prototype,"ariaLabel",2),ne([a({type:String})],Y.prototype,"variant",2),ne([a({type:String,reflect:!0})],Y.prototype,"size",2),ne([a({type:String,reflect:!0})],Y.prototype,"shape",2),ne([a({type:Boolean,reflect:!0})],Y.prototype,"toggle",2),ne([a({type:Boolean,reflect:!0})],Y.prototype,"selected",2),ne([a({type:String})],Y.prototype,"toggleofficon",2),ne([a({type:String})],Y.prototype,"toggleonicon",2),ne([a({type:Boolean,reflect:!0})],Y.prototype,"disabled",2),ne([a({type:String,reflect:!0})],Y.prototype,"spacing",2),ne([a({type:String,attribute:"spacing-top",reflect:!0})],Y.prototype,"spacingTop",2),ne([a({type:String,attribute:"spacing-bottom",reflect:!0})],Y.prototype,"spacingBottom",2),ne([a({type:String,attribute:"spacing-left",reflect:!0})],Y.prototype,"spacingLeft",2),ne([a({type:String,attribute:"spacing-right",reflect:!0})],Y.prototype,"spacingRight",2),ne([a({type:String})],Y.prototype,"href",2),ne([a({type:String})],Y.prototype,"target",2),ne([a({type:String})],Y.prototype,"rel",2),Y=ne([g("scb-icon-button")],Y);const Mv=Object.freeze(Object.defineProperty({__proto__:null,get ScbIconButton(){return Y}},Symbol.toStringTag,{value:"Module"}));var Dv=Object.defineProperty,Bv=Object.getOwnPropertyDescriptor,ud=t=>{throw TypeError(t)},se=(t,e,i,r)=>{for(var s=r>1?void 0:r?Bv(e,i):e,o=t.length-1,n;o>=0;o--)(n=t[o])&&(s=(r?n(e,i,s):n(s))||s);return r&&s&&Dv(e,i,s),s},Kn=(t,e,i)=>e.has(t)||ud("Cannot "+i),Wo=(t,e,i)=>(Kn(t,e,"read from private field"),i?i.call(t):e.get(t)),Fs=(t,e,i)=>e.has(t)?ud("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),Gn=(t,e,i,r)=>(Kn(t,e,"write to private field"),e.set(t,i),i),vd=(t,e,i)=>(Kn(t,e,"access private method"),i),Uo,jo,Ko,Go,Yn,Xn;let ee=class extends y{constructor(){super(...arguments),Fs(this,Go),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,Fs(this,Uo,!1),Fs(this,jo,!1),Fs(this,Ko,!1),this.onRowClick=()=>{var i,r;if(this.type==="link"&&(this.href||this.itemHref))return;const t=(i=this.shadowRoot)==null?void 0:i.querySelector("scb-checkbox"),e=(r=this.shadowRoot)==null?void 0:r.querySelector("scb-switch");t&&(t.checked=!t.checked),e&&(e.selected=!e.selected)},Fs(this,Xn,t=>{var e;if(!t.defaultPrevented&&(t.key==="Enter"||t.key===" ")){if(this.type==="link"){const i=(e=this.shadowRoot)==null?void 0:e.querySelector("a[href]");if(i){t.preventDefault(),i.click();return}}t.preventDefault(),this.onRowClick()}})}static get styles(){return f`
2330
2330
  :host {
2331
2331
  border-bottom: var(--stroke-border, 1px) solid var(--md-sys-color-outline-variant);
2332
2332
  margin-bottom: calc(var(--stroke-border, 1px) * -1);
@@ -2465,7 +2465,7 @@
2465
2465
  </div>
2466
2466
 
2467
2467
  <md-focus-ring></md-focus-ring>
2468
- `}};Uo=new WeakMap,jo=new WeakMap,Ko=new WeakMap,Go=new WeakSet,Yn=async function(){const t=this.type==="link"&&(!this.trailing||this.trailingVariant==="icon");(this.leading&&this.leadingVariant==="icon"||this.trailing&&this.trailingVariant==="icon"||t)&&!Wo(this,Uo)&&(await Promise.resolve().then(()=>li),Gn(this,Uo,!0)),this.trailing&&this.trailingVariant==="checkbox"&&!Wo(this,jo)&&(await Promise.resolve().then(()=>zb),Gn(this,jo,!0)),this.trailing&&this.trailingVariant==="switch"&&!Wo(this,Ko)&&(await Promise.resolve().then(()=>Hb),Gn(this,Ko,!0))},Xn=new WeakMap,se([a({type:String,reflect:!0,attribute:"type"})],Q.prototype,"type",2),se([a({type:String})],Q.prototype,"href",2),se([a({type:String,attribute:"item-href"})],Q.prototype,"itemHref",2),se([a({type:String,attribute:"target"})],Q.prototype,"target",2),se([a({type:Boolean,attribute:"disabled"})],Q.prototype,"disabled",2),se([a({type:String,reflect:!0})],Q.prototype,"label",2),se([a({type:String,attribute:"supporting-text"})],Q.prototype,"supportingText",2),se([a({type:String,attribute:"overline"})],Q.prototype,"overline",2),se([a({type:Boolean})],Q.prototype,"leading",2),se([a({type:String,attribute:"leading-variant",reflect:!0})],Q.prototype,"leadingVariant",2),se([a({type:String,attribute:"leading-icon"})],Q.prototype,"leadingIcon",2),se([a({type:String,attribute:"avatar-label"})],Q.prototype,"avatarLabel",2),se([a({type:String,attribute:"avatar-alt"})],Q.prototype,"avatarAlt",2),se([a({type:String,attribute:"avatar-variant"})],Q.prototype,"avatarVariant",2),se([a({type:String,attribute:"avatar-src"})],Q.prototype,"avatarSrc",2),se([a({type:String,reflect:!0,attribute:"img-href-image"})],Q.prototype,"imgHrefImage",2),se([a({type:Boolean})],Q.prototype,"trailing",2),se([a({type:String,attribute:"trailing-variant",reflect:!0})],Q.prototype,"trailingVariant",2),se([a({type:String,attribute:"trailing-icon"})],Q.prototype,"trailingIcon",2),se([a({type:Number,reflect:!0})],Q.prototype,"density",2),se([a({type:Boolean,attribute:"no-divider",reflect:!0})],Q.prototype,"noDivider",2),Q=se([g("scb-list-item")],Q);var Fv=Object.defineProperty,Nv=Object.getOwnPropertyDescriptor,bd=t=>{throw TypeError(t)},tr=(t,e,i,r)=>{for(var s=r>1?void 0:r?Nv(e,i):e,o=t.length-1,n;o>=0;o--)(n=t[o])&&(s=(r?n(e,i,s):n(s))||s);return r&&s&&Fv(e,i,s),s},md=(t,e,i)=>e.has(t)||bd("Cannot "+i),Hv=(t,e,i)=>(md(t,e,"read from private field"),e.get(t)),qv=(t,e,i)=>e.has(t)?bd("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),Vv=(t,e,i,r)=>(md(t,e,"write to private field"),e.set(t,i),i),Yo;let pi=class extends y{constructor(){super(...arguments),qv(this,Yo,!1),this.noDivider=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._onSlotChange=()=>this._setupItems()}async firstUpdated(){Hv(this,Yo)||(await Promise.resolve().then(()=>mu),Vv(this,Yo,!0)),this._setupItems(),this._applySpacing()}updated(t){super.updated(t),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&this._applySpacing()}_getItems(){var e;return(((e=this._slotEl)==null?void 0:e.assignedElements({flatten:!0}))??[]).filter(i=>i instanceof HTMLElement)}_setupItems(){var i;this._getItems().forEach((r,s)=>{r.hasAttribute("role")||r.setAttribute("role","listitem"),r.setAttribute("tabindex",s===0?"0":"-1")});const e=(i=this.renderRoot)==null?void 0:i.querySelector("md-list");e&&!e.hasAttribute("data-kbd")&&(e.setAttribute("data-kbd","true"),e.addEventListener("keydown",r=>this._onKeyDown(r)))}_onKeyDown(t){const e=this._getItems();if(!e.length)return;const i=e.findIndex(s=>s.getAttribute("tabindex")==="0"),r=s=>{const o=(s%e.length+e.length)%e.length;e.forEach(l=>l.setAttribute("tabindex","-1"));const n=e[o];n.setAttribute("tabindex","0"),n.focus()};switch(t.key){case"ArrowDown":case"ArrowRight":t.preventDefault(),r(i<0?0:i+1);break;case"ArrowUp":case"ArrowLeft":t.preventDefault(),r(i<0?0:i-1);break;case"Home":t.preventDefault(),r(0);break;case"End":t.preventDefault(),r(e.length-1);break}}_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}_applySpacing(){const t=this._mapSpacingToken(this.spacing),e=this._mapSpacingToken(this.spacingTop)??t,i=this._mapSpacingToken(this.spacingBottom)??t,r=this._mapSpacingToken(this.spacingLeft),s=this._mapSpacingToken(this.spacingRight);e?this.style.marginBlockStart=e:this.style.removeProperty("margin-block-start"),i?this.style.marginBlockEnd=i:this.style.removeProperty("margin-block-end"),r?this.style.marginInlineStart=r:this.style.removeProperty("margin-inline-start"),s?this.style.marginInlineEnd=s:this.style.removeProperty("margin-inline-end")}render(){return c`
2468
+ `}};Uo=new WeakMap,jo=new WeakMap,Ko=new WeakMap,Go=new WeakSet,Yn=async function(){const t=this.type==="link"&&(!this.trailing||this.trailingVariant==="icon");(this.leading&&this.leadingVariant==="icon"||this.trailing&&this.trailingVariant==="icon"||t)&&!Wo(this,Uo)&&(await Promise.resolve().then(()=>li),Gn(this,Uo,!0)),this.trailing&&this.trailingVariant==="checkbox"&&!Wo(this,jo)&&(await Promise.resolve().then(()=>zb),Gn(this,jo,!0)),this.trailing&&this.trailingVariant==="switch"&&!Wo(this,Ko)&&(await Promise.resolve().then(()=>Hb),Gn(this,Ko,!0))},Xn=new WeakMap,se([a({type:String,reflect:!0,attribute:"type"})],ee.prototype,"type",2),se([a({type:String})],ee.prototype,"href",2),se([a({type:String,attribute:"item-href"})],ee.prototype,"itemHref",2),se([a({type:String,attribute:"target"})],ee.prototype,"target",2),se([a({type:Boolean,attribute:"disabled"})],ee.prototype,"disabled",2),se([a({type:String,reflect:!0})],ee.prototype,"label",2),se([a({type:String,attribute:"supporting-text"})],ee.prototype,"supportingText",2),se([a({type:String,attribute:"overline"})],ee.prototype,"overline",2),se([a({type:Boolean})],ee.prototype,"leading",2),se([a({type:String,attribute:"leading-variant",reflect:!0})],ee.prototype,"leadingVariant",2),se([a({type:String,attribute:"leading-icon"})],ee.prototype,"leadingIcon",2),se([a({type:String,attribute:"avatar-label"})],ee.prototype,"avatarLabel",2),se([a({type:String,attribute:"avatar-alt"})],ee.prototype,"avatarAlt",2),se([a({type:String,attribute:"avatar-variant"})],ee.prototype,"avatarVariant",2),se([a({type:String,attribute:"avatar-src"})],ee.prototype,"avatarSrc",2),se([a({type:String,reflect:!0,attribute:"img-href-image"})],ee.prototype,"imgHrefImage",2),se([a({type:Boolean})],ee.prototype,"trailing",2),se([a({type:String,attribute:"trailing-variant",reflect:!0})],ee.prototype,"trailingVariant",2),se([a({type:String,attribute:"trailing-icon"})],ee.prototype,"trailingIcon",2),se([a({type:Number,reflect:!0})],ee.prototype,"density",2),se([a({type:Boolean,attribute:"no-divider",reflect:!0})],ee.prototype,"noDivider",2),ee=se([g("scb-list-item")],ee);var Fv=Object.defineProperty,Nv=Object.getOwnPropertyDescriptor,bd=t=>{throw TypeError(t)},tr=(t,e,i,r)=>{for(var s=r>1?void 0:r?Nv(e,i):e,o=t.length-1,n;o>=0;o--)(n=t[o])&&(s=(r?n(e,i,s):n(s))||s);return r&&s&&Fv(e,i,s),s},md=(t,e,i)=>e.has(t)||bd("Cannot "+i),Hv=(t,e,i)=>(md(t,e,"read from private field"),e.get(t)),qv=(t,e,i)=>e.has(t)?bd("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),Vv=(t,e,i,r)=>(md(t,e,"write to private field"),e.set(t,i),i),Yo;let pi=class extends y{constructor(){super(...arguments),qv(this,Yo,!1),this.noDivider=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._onSlotChange=()=>this._setupItems()}async firstUpdated(){Hv(this,Yo)||(await Promise.resolve().then(()=>mu),Vv(this,Yo,!0)),this._setupItems(),this._applySpacing()}updated(t){super.updated(t),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&this._applySpacing()}_getItems(){var e;return(((e=this._slotEl)==null?void 0:e.assignedElements({flatten:!0}))??[]).filter(i=>i instanceof HTMLElement)}_setupItems(){var i;this._getItems().forEach((r,s)=>{r.hasAttribute("role")||r.setAttribute("role","listitem"),r.setAttribute("tabindex",s===0?"0":"-1")});const e=(i=this.renderRoot)==null?void 0:i.querySelector("md-list");e&&!e.hasAttribute("data-kbd")&&(e.setAttribute("data-kbd","true"),e.addEventListener("keydown",r=>this._onKeyDown(r)))}_onKeyDown(t){const e=this._getItems();if(!e.length)return;const i=e.findIndex(s=>s.getAttribute("tabindex")==="0"),r=s=>{const o=(s%e.length+e.length)%e.length;e.forEach(l=>l.setAttribute("tabindex","-1"));const n=e[o];n.setAttribute("tabindex","0"),n.focus()};switch(t.key){case"ArrowDown":case"ArrowRight":t.preventDefault(),r(i<0?0:i+1);break;case"ArrowUp":case"ArrowLeft":t.preventDefault(),r(i<0?0:i-1);break;case"Home":t.preventDefault(),r(0);break;case"End":t.preventDefault(),r(e.length-1);break}}_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}_applySpacing(){const t=this._mapSpacingToken(this.spacing),e=this._mapSpacingToken(this.spacingTop)??t,i=this._mapSpacingToken(this.spacingBottom)??t,r=this._mapSpacingToken(this.spacingLeft),s=this._mapSpacingToken(this.spacingRight);e?this.style.marginBlockStart=e:this.style.removeProperty("margin-block-start"),i?this.style.marginBlockEnd=i:this.style.removeProperty("margin-block-end"),r?this.style.marginInlineStart=r:this.style.removeProperty("margin-inline-start"),s?this.style.marginInlineEnd=s:this.style.removeProperty("margin-inline-end")}render(){return c`
2469
2469
  <md-list role="list" @slotchange=${this._onSlotChange}>
2470
2470
  <slot></slot>
2471
2471
  </md-list>
@@ -4559,7 +4559,7 @@ ${this.value}</textarea
4559
4559
  color: var(--md-sys-color-on-surface);
4560
4560
  font-size: var(--md-sys-typescale-body-large-size);
4561
4561
  }
4562
- `,Se([a({type:String,reflect:!0})],le.prototype,"variant",2),Se([a({type:String})],le.prototype,"label",2),Se([a({type:String})],le.prototype,"icon",2),Se([a({type:Boolean,reflect:!0})],le.prototype,"disabled",2),Se([a({type:Boolean,reflect:!0})],le.prototype,"elevated",2),Se([a({type:Boolean,reflect:!0})],le.prototype,"removable",2),Se([a({type:Boolean,reflect:!0})],le.prototype,"selected",2),Se([a({type:String})],le.prototype,"href",2),Se([a({type:String})],le.prototype,"target",2),Se([a({type:String})],le.prototype,"name",2),Se([a({type:String})],le.prototype,"value",2),Se([a({type:String,reflect:!0})],le.prototype,"spacing",2),Se([a({type:String,reflect:!0,attribute:"spacing-top"})],le.prototype,"spacingTop",2),Se([a({type:String,reflect:!0,attribute:"spacing-bottom"})],le.prototype,"spacingBottom",2),Se([a({type:String,reflect:!0,attribute:"spacing-left"})],le.prototype,"spacingLeft",2),Se([a({type:String,reflect:!0,attribute:"spacing-right"})],le.prototype,"spacingRight",2),Se([a({type:String,reflect:!0})],le.prototype,"size",2),le=Se([g("scb-chip")],le);var jb=Object.defineProperty,Kb=Object.getOwnPropertyDescriptor,ee=(t,e,i,r)=>{for(var s=r>1?void 0:r?Kb(e,i):e,o=t.length-1,n;o>=0;o--)(n=t[o])&&(s=(r?n(e,i,s):n(s))||s);return r&&s&&jb(e,i,s),s};let U=class extends y{constructor(){super(...arguments),this.open=!1,this.inSb=!1,this.scrimClose=!0,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.variant="basic",this.label="",this.icon="",this.supportingText="",this.okButton="OK",this.cancelButton="Avbryt",this.deleteButton="Delete",this.confirmButton="Ta bort",this.denyButton="Avbryt",this.resetButton="Återställ",this.submitButton="Spara",this.formId="",this.formAction="",this.formMethod="",this.__lastTriggerEl=null,this.__onDocumentClick=t=>{this.__getActionFromEvent(t)==="toggle"&&(this.__setOpen(!this.open),t.stopPropagation())},this.__onDocumentKeydown=t=>{this.open&&t.key==="Escape"&&(this.__fire("esc"),this.__setOpen(!1))},this.__onScrimClick=()=>{this.scrimClose&&(this.__fire("scrim"),this.__setOpen(!1))},this.__onOk=()=>{this.__fire("ok"),this.__setOpen(!1)},this.__onCancel=()=>{this.__fire("cancel"),this.__setOpen(!1)},this.__onConfirm=()=>{this.__fire("confirm"),this.__setOpen(!1)},this.__onDeny=()=>{this.__fire("deny"),this.__setOpen(!1)},this.__onReset=()=>{var e,i,r,s;(i=(e=this.shadowRoot)==null?void 0:e.querySelector("form"))==null||i.reset(),(((s=(r=this.shadowRoot)==null?void 0:r.querySelector("slot"))==null?void 0:s.assignedElements({flatten:!0}))??[]).forEach(o=>{const n=o.tagName;n==="SCB-TEXTFIELD"&&(o.value=""),n==="SCB-CHECKBOX"&&(o.checked=!1),n==="SCB-RADIO-BUTTON"&&(o.checked=!1),n==="SCB-SWITCH"&&(o.selected=!1),n==="SCB-CHIP"&&(o.selected=!1)}),this.__fire("reset")},this.__onSubmit=()=>{var t,e;(e=(t=this.shadowRoot)==null?void 0:t.querySelector("form"))==null||e.requestSubmit(),this.__fire("submit"),this.__setOpen(!1)},this.__onKeydownTrap=t=>{if(!this.open||t.key!=="Tab")return;const e=Array.from(this.shadowRoot.querySelectorAll('button,[href],input,select,textarea,[tabindex]:not([tabindex="-1"])')).filter(s=>!s.hasAttribute("disabled"));if(!e.length)return;const i=e[0],r=e[e.length-1];t.shiftKey&&document.activeElement===i?(r.focus(),t.preventDefault()):!t.shiftKey&&document.activeElement===r&&(i.focus(),t.preventDefault())}}__getActionFromEvent(t){if(!this.id)return null;for(const e of t.composedPath())if(e instanceof Element){if(e.getAttribute("data-dialog-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),document.addEventListener("keydown",this.__onDocumentKeydown,!0),this.addEventListener("keydown",this.__onKeydownTrap)}disconnectedCallback(){document.removeEventListener("click",this.__onDocumentClick,!1),document.removeEventListener("keydown",this.__onDocumentKeydown,!0),this.removeEventListener("keydown",this.__onKeydownTrap),super.disconnectedCallback()}updated(t){var e,i;if(t.has("open")){const r=t.get("open");this.__updateTriggersExpanded(),this.open&&!r?this.updateComplete.then(()=>{var o,n,l;const s=(o=this.shadowRoot)==null?void 0:o.querySelector('button,[href],input,select,textarea,[tabindex]:not([tabindex="-1"])');s?s.focus():(l=(n=this.shadowRoot)==null?void 0:n.querySelector(".container"))==null||l.focus()}):!this.open&&r&&((i=(e=this.__lastTriggerEl)==null?void 0:e.focus)==null||i.call(e)),this.__toggleScrollLock(this.open)}(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&this.__applySpacing()}__updateTriggersExpanded(){this.id&&document.querySelectorAll(`[aria-controls="${this.id}"], [data-dialog-toggle="${this.id}"]`).forEach(t=>{t.hasAttribute("aria-controls")&&t.setAttribute("aria-expanded",String(this.open))})}__toggleScrollLock(t){if(this.inSb)return;const e=document.documentElement;e.style.overflow=t?"hidden":""}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}__applySpacing(){const t=this.mapSpacingToken(this.spacing),e=this.mapSpacingToken(this.spacingTop)??t,i=this.mapSpacingToken(this.spacingBottom)??t,r=this.mapSpacingToken(this.spacingLeft),s=this.mapSpacingToken(this.spacingRight);e?this.style.setProperty("--scb-dialog-spacing-block-start",e):this.style.removeProperty("--scb-dialog-spacing-block-start"),i?this.style.setProperty("--scb-dialog-spacing-block-end",i):this.style.removeProperty("--scb-dialog-spacing-block-end"),r?this.style.setProperty("--scb-dialog-spacing-inline-start",r):this.style.removeProperty("--scb-dialog-spacing-inline-start"),s?this.style.setProperty("--scb-dialog-spacing-inline-end",s):this.style.removeProperty("--scb-dialog-spacing-inline-end")}__setOpen(t){this.open=t,this.__fire(t?"open":"close")}__fire(t,e){this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0}))}__slotIsEmpty(){var e;const t=(e=this.shadowRoot)==null?void 0:e.querySelector("slot");return t?t.assignedElements({flatten:!0}).length===0:!0}renderHeader(t){const e=this.variant==="form"||this.variant==="floating";return c`
4562
+ `,Se([a({type:String,reflect:!0})],le.prototype,"variant",2),Se([a({type:String})],le.prototype,"label",2),Se([a({type:String})],le.prototype,"icon",2),Se([a({type:Boolean,reflect:!0})],le.prototype,"disabled",2),Se([a({type:Boolean,reflect:!0})],le.prototype,"elevated",2),Se([a({type:Boolean,reflect:!0})],le.prototype,"removable",2),Se([a({type:Boolean,reflect:!0})],le.prototype,"selected",2),Se([a({type:String})],le.prototype,"href",2),Se([a({type:String})],le.prototype,"target",2),Se([a({type:String})],le.prototype,"name",2),Se([a({type:String})],le.prototype,"value",2),Se([a({type:String,reflect:!0})],le.prototype,"spacing",2),Se([a({type:String,reflect:!0,attribute:"spacing-top"})],le.prototype,"spacingTop",2),Se([a({type:String,reflect:!0,attribute:"spacing-bottom"})],le.prototype,"spacingBottom",2),Se([a({type:String,reflect:!0,attribute:"spacing-left"})],le.prototype,"spacingLeft",2),Se([a({type:String,reflect:!0,attribute:"spacing-right"})],le.prototype,"spacingRight",2),Se([a({type:String,reflect:!0})],le.prototype,"size",2),le=Se([g("scb-chip")],le);var jb=Object.defineProperty,Kb=Object.getOwnPropertyDescriptor,X=(t,e,i,r)=>{for(var s=r>1?void 0:r?Kb(e,i):e,o=t.length-1,n;o>=0;o--)(n=t[o])&&(s=(r?n(e,i,s):n(s))||s);return r&&s&&jb(e,i,s),s};let W=class extends y{constructor(){super(...arguments),this.open=!1,this.inSb=!1,this.scrimClose=!0,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.variant="basic",this.label="",this.icon="",this.supportingText="",this.okButton="OK",this.cancelButton="Avbryt",this.deleteButton="Delete",this.confirmButton="Ta bort",this.denyButton="Avbryt",this.resetButton="Återställ",this.submitButton="Spara",this.formId="",this.formAction="",this.formMethod="",this.__lastTriggerEl=null,this.__onDocumentClick=t=>{this.__getActionFromEvent(t)==="toggle"&&(this.__setOpen(!this.open),t.stopPropagation())},this.__onDocumentKeydown=t=>{this.open&&t.key==="Escape"&&(this.__fire("esc"),this.__setOpen(!1))},this.__onScrimClick=()=>{this.scrimClose&&(this.__fire("scrim"),this.__setOpen(!1))},this.__onOk=()=>{this.__fire("ok"),this.__setOpen(!1)},this.__onCancel=()=>{this.__fire("cancel"),this.__setOpen(!1)},this.__onConfirm=()=>{this.__fire("confirm"),this.__setOpen(!1)},this.__onDeny=()=>{this.__fire("deny"),this.__setOpen(!1)},this.__onReset=()=>{var e,i,r,s;(i=(e=this.shadowRoot)==null?void 0:e.querySelector("form"))==null||i.reset(),(((s=(r=this.shadowRoot)==null?void 0:r.querySelector("slot"))==null?void 0:s.assignedElements({flatten:!0}))??[]).forEach(o=>{const n=o.tagName;n==="SCB-TEXTFIELD"&&(o.value=""),n==="SCB-CHECKBOX"&&(o.checked=!1),n==="SCB-RADIO-BUTTON"&&(o.checked=!1),n==="SCB-SWITCH"&&(o.selected=!1),n==="SCB-CHIP"&&(o.selected=!1)}),this.__fire("reset")},this.__onSubmit=()=>{var t,e;(e=(t=this.shadowRoot)==null?void 0:t.querySelector("form"))==null||e.requestSubmit(),this.__fire("submit"),this.__setOpen(!1)},this.__onKeydownTrap=t=>{if(!this.open||t.key!=="Tab")return;const e=Array.from(this.shadowRoot.querySelectorAll('button,[href],input,select,textarea,[tabindex]:not([tabindex="-1"])')).filter(s=>!s.hasAttribute("disabled"));if(!e.length)return;const i=e[0],r=e[e.length-1];t.shiftKey&&document.activeElement===i?(r.focus(),t.preventDefault()):!t.shiftKey&&document.activeElement===r&&(i.focus(),t.preventDefault())}}__getActionFromEvent(t){if(!this.id)return null;for(const e of t.composedPath())if(e instanceof Element){if(e.getAttribute("data-dialog-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(),this.__applyZIndex(),document.addEventListener("click",this.__onDocumentClick,!1),document.addEventListener("keydown",this.__onDocumentKeydown,!0),this.addEventListener("keydown",this.__onKeydownTrap)}disconnectedCallback(){document.removeEventListener("click",this.__onDocumentClick,!1),document.removeEventListener("keydown",this.__onDocumentKeydown,!0),this.removeEventListener("keydown",this.__onKeydownTrap),super.disconnectedCallback()}__applyZIndex(){const t=typeof this.zIndex=="number"&&Number.isFinite(this.zIndex)?this.zIndex:void 0;if(t===void 0){this.style.removeProperty("--z-dialog-scrim"),this.style.removeProperty("--z-dialog");return}this.style.setProperty("--z-dialog-scrim",String(t)),this.style.setProperty("--z-dialog",String(t+1))}updated(t){var e,i;if(t.has("zIndex")&&this.__applyZIndex(),t.has("open")){const r=t.get("open");this.__updateTriggersExpanded(),this.open&&!r?this.updateComplete.then(()=>{var o,n,l;const s=(o=this.shadowRoot)==null?void 0:o.querySelector('button,[href],input,select,textarea,[tabindex]:not([tabindex="-1"])');s?s.focus():(l=(n=this.shadowRoot)==null?void 0:n.querySelector(".container"))==null||l.focus()}):!this.open&&r&&((i=(e=this.__lastTriggerEl)==null?void 0:e.focus)==null||i.call(e)),this.__toggleScrollLock(this.open)}(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&this.__applySpacing()}__updateTriggersExpanded(){this.id&&document.querySelectorAll(`[aria-controls="${this.id}"], [data-dialog-toggle="${this.id}"]`).forEach(t=>{t.hasAttribute("aria-controls")&&t.setAttribute("aria-expanded",String(this.open))})}__toggleScrollLock(t){if(this.inSb)return;const e=document.documentElement;e.style.overflow=t?"hidden":""}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}__applySpacing(){const t=this.mapSpacingToken(this.spacing),e=this.mapSpacingToken(this.spacingTop)??t,i=this.mapSpacingToken(this.spacingBottom)??t,r=this.mapSpacingToken(this.spacingLeft),s=this.mapSpacingToken(this.spacingRight);e?this.style.setProperty("--scb-dialog-spacing-block-start",e):this.style.removeProperty("--scb-dialog-spacing-block-start"),i?this.style.setProperty("--scb-dialog-spacing-block-end",i):this.style.removeProperty("--scb-dialog-spacing-block-end"),r?this.style.setProperty("--scb-dialog-spacing-inline-start",r):this.style.removeProperty("--scb-dialog-spacing-inline-start"),s?this.style.setProperty("--scb-dialog-spacing-inline-end",s):this.style.removeProperty("--scb-dialog-spacing-inline-end")}__setOpen(t){this.open=t,this.__fire(t?"open":"close")}__fire(t,e){this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0}))}__slotIsEmpty(){var e;const t=(e=this.shadowRoot)==null?void 0:e.querySelector("slot");return t?t.assignedElements({flatten:!0}).length===0:!0}renderHeader(t){const e=this.variant==="form"||this.variant==="floating";return c`
4563
4563
  <div class="header">
4564
4564
  <div class="title">
4565
4565
  ${this.icon?c`<md-icon class="dialog-icon">${this.icon}</md-icon>`:h}
@@ -4606,7 +4606,7 @@ ${this.value}</textarea
4606
4606
  >
4607
4607
  ${this.renderBody(t,e)}
4608
4608
  </div>
4609
- `}};U.styles=f`
4609
+ `}};W.styles=f`
4610
4610
  :host {
4611
4611
  display:block;
4612
4612
  position:relative;
@@ -4755,7 +4755,7 @@ ${this.value}</textarea
4755
4755
  to { opacity: 0; }
4756
4756
  }
4757
4757
 
4758
- `,ee([a({type:Boolean,reflect:!0})],U.prototype,"open",2),ee([a({type:Boolean,attribute:!1})],U.prototype,"inSb",2),ee([a({type:Boolean,attribute:"scrim-close"})],U.prototype,"scrimClose",2),ee([a({type:String,reflect:!0})],U.prototype,"spacing",2),ee([a({type:String,attribute:"spacing-top",reflect:!0})],U.prototype,"spacingTop",2),ee([a({type:String,attribute:"spacing-bottom",reflect:!0})],U.prototype,"spacingBottom",2),ee([a({type:String,attribute:"spacing-left",reflect:!0})],U.prototype,"spacingLeft",2),ee([a({type:String,attribute:"spacing-right",reflect:!0})],U.prototype,"spacingRight",2),ee([a({type:String})],U.prototype,"variant",2),ee([a({type:String})],U.prototype,"label",2),ee([a({type:String})],U.prototype,"icon",2),ee([a({type:String,attribute:"supporting-text"})],U.prototype,"supportingText",2),ee([a({type:String,attribute:"ok-button"})],U.prototype,"okButton",2),ee([a({type:String,attribute:"cancel-button"})],U.prototype,"cancelButton",2),ee([a({type:String,attribute:"delete-button"})],U.prototype,"deleteButton",2),ee([a({type:String,attribute:"confirm-button"})],U.prototype,"confirmButton",2),ee([a({type:String,attribute:"deny-button"})],U.prototype,"denyButton",2),ee([a({type:String,attribute:"reset-button"})],U.prototype,"resetButton",2),ee([a({type:String,attribute:"submit-button"})],U.prototype,"submitButton",2),ee([a({type:String,attribute:"form-id"})],U.prototype,"formId",2),ee([a({type:String,attribute:"form-action"})],U.prototype,"formAction",2),ee([a({type:String,attribute:"form-method"})],U.prototype,"formMethod",2),U=ee([g("scb-dialog")],U);var Gb=Object.defineProperty,Yb=Object.getOwnPropertyDescriptor,Ud=t=>{throw TypeError(t)},st=(t,e,i,r)=>{for(var s=r>1?void 0:r?Yb(e,i):e,o=t.length-1,n;o>=0;o--)(n=t[o])&&(s=(r?n(e,i,s):n(s))||s);return r&&s&&Gb(e,i,s),s},Xb=(t,e,i)=>e.has(t)||Ud("Cannot "+i),Jb=(t,e,i)=>e.has(t)?Ud("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),jd=(t,e,i)=>(Xb(t,e,"access private method"),i),ua,gl;let Re=class extends y{constructor(){super(...arguments),Jb(this,ua),this._lastActiveDay=null,this.lang="sv",this.disableWeekend=!1,this.publicHolidays=!0,this.displayYear=new Date().getFullYear(),this.displayMonth=new Date().getMonth()+1,this.selectedDate="",this.eventsJson=void 0,this._eventsFromJson=null,this._eventsJsonLast=void 0,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._mutationObserver=null,this._syncingDisplay=!1,this._onCalendarKeyDown=t=>{var d,u;const i=Array.from(((d=this.shadowRoot)==null?void 0:d.querySelectorAll(".calendar-day.has-event"))??[]),r=(u=this.shadowRoot)==null?void 0:u.activeElement,s=r&&i.includes(r)?r:document.activeElement,o=i.indexOf(s);if(o===-1)return;let n=o;const l=this.disableWeekend?5:7;switch(t.key){case"ArrowRight":n=o+1<i.length?o+1:o;break;case"ArrowLeft":n=o-1>=0?o-1:o;break;case"ArrowDown":n=o+l<i.length?o+l:o;break;case"ArrowUp":n=o-l>=0?o-l:o;break;default:return}n!==o&&(t.preventDefault(),i[n].focus())},this._onEventChanged=()=>{this.requestUpdate()},this._today=new Date,this._current=new Date,this._popupEvent=null,this._restoreDayFocus=()=>{this._lastActiveDay&&setTimeout(()=>{var t;(t=this._lastActiveDay)==null||t.focus(),this._lastActiveDay=null},0)},this._easterDateCalculated={}}get value(){return this.selectedDate}set value(t){const e=(t??"")+"";e!==this.selectedDate&&(this.selectedDate=e)}static get observedAttributes(){return[...super.observedAttributes??[],"value"]}attributeChangedCallback(t,e,i){super.attributeChangedCallback(t,e,i),t==="value"&&(this.value=i??"")}connectedCallback(){super.connectedCallback(),jd(this,ua,gl).call(this);const t=Number(this.displayYear),e=Number(this.displayMonth);!Number.isNaN(t)&&!Number.isNaN(e)&&e>=1&&e<=12&&(this._current=new Date(t,e-1,1)),this._syncDisplayFromCurrent(!1),this.addEventListener("change",this._onEventChanged),this._mutationObserver=new MutationObserver(()=>{this.requestUpdate()}),this._mutationObserver.observe(this,{childList:!0}),this.addEventListener("keydown",this._onCalendarKeyDown)}disconnectedCallback(){this.removeEventListener("change",this._onEventChanged),super.disconnectedCallback(),this._mutationObserver&&(this._mutationObserver.disconnect(),this._mutationObserver=null),this.removeEventListener("keydown",this._onCalendarKeyDown)}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}updated(t){var e;if((e=super.updated)==null||e.call(this,t),t.has("eventsJson")&&(this._eventsJsonLast=void 0,this._eventsFromJson=null),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&jd(this,ua,gl).call(this),!this._syncingDisplay&&(t.has("displayYear")||t.has("displayMonth"))){const i=Number(this.displayYear),r=Number(this.displayMonth);if(!Number.isNaN(i)&&!Number.isNaN(r)&&r>=1&&r<=12){const s=this._current.getFullYear(),o=this._current.getMonth()+1;(s!==i||o!==r)&&(this._current=new Date(i,r-1,1),this._dispatchMonthChange(i,r),this.requestUpdate())}}}_ensureEventsFromJson(){const t=(this.eventsJson??"").trim();if(!t){this._eventsFromJson=null,this._eventsJsonLast=t;return}if(!(this._eventsJsonLast===t&&this._eventsFromJson!==null)){this._eventsJsonLast=t;try{const e=JSON.parse(t);Array.isArray(e)?this._eventsFromJson=e:this._eventsFromJson=[]}catch{this._eventsFromJson=[]}}}_getEventInputs(){return Array.isArray(this.events)?this.events:(this._ensureEventsFromJson(),this._eventsFromJson!==null?this._eventsFromJson:null)}_normalizeEventInput(t){const e=t.title??"",i=t.description??"",r=t.startDate??t["start-date"]??t.start??t.date??"",s=t.endDate??t["end-date"]??t.end??"";return{title:e+"",description:i?i+"":void 0,start:r?r+"":void 0,end:s?s+"":void 0}}_buildEventMapFromInputs(t){const e=new Map;for(const i of t){const r=this._normalizeEventInput(i),s=r.start||"",o=r.end||"";if(!(!s||!r.title))if(s&&o){const n=new Date(s),l=new Date(o);for(let d=new Date(n);d<=l;d.setDate(d.getDate()+1)){const u=d.toISOString().split("T")[0],v=e.get(u)||[];v.push({title:r.title,description:r.description,start:s,end:o}),e.set(u,v)}}else{const n=s.split("T")[0],l=e.get(n)||[];l.push({title:r.title,description:r.description,start:s}),e.set(n,l)}}return e}_buildEventMapFromChildren(){const t=Array.from(this.querySelectorAll("scb-calendar-event")),e=new Map;for(const i of t){const r=i,s=(r.startDate??r.date??"")+""||i.getAttribute("start-date")||i.getAttribute("date")||"",o=(r.endDate??"")+""||i.getAttribute("end-date")||"";if(s&&o){const n=new Date(s),l=new Date(o);for(let d=new Date(n);d<=l;d.setDate(d.getDate()+1)){const u=d.toISOString().split("T")[0],v=e.get(u)||[];v.push({title:i.title??"",description:i.description,start:s,end:o}),e.set(u,v)}}else if(s&&i.title){const n=s.split("T")[0],l=e.get(n)||[];l.push({title:i.title,description:i.description,start:s}),e.set(n,l)}}return e}_syncDisplayFromCurrent(t=!0){const e=this._current.getFullYear(),i=this._current.getMonth()+1;this._syncingDisplay=!0;try{this.displayYear=e,this.displayMonth=i}finally{this._syncingDisplay=!1}t&&this._dispatchMonthChange(e,i)}_dispatchMonthChange(t,e){const i={displayYear:t,displayMonth:e};this.dispatchEvent(new CustomEvent("scb-calendar-month-change",{bubbles:!0,composed:!0,detail:i})),this.dispatchEvent(new CustomEvent("scbcalendarmonthchange",{bubbles:!0,composed:!0,detail:i}))}_dispatchSelect(t){const e={selectedDate:t};this.dispatchEvent(new CustomEvent("scb-calendar-select",{bubbles:!0,composed:!0,detail:e})),this.dispatchEvent(new CustomEvent("scbcalendarselect",{bubbles:!0,composed:!0,detail:e}))}_daysInMonth(t,e){return new Date(t,e+1,0).getDate()}_firstDayOfWeek(t,e){const i=new Date(t,e,1).getDay();return i===0?6:i-1}_prevMonth(){this._current=new Date(this._current.getFullYear(),this._current.getMonth()-1,1),this.selectedDate="",this._popupEvent=null,this._syncDisplayFromCurrent(),this.requestUpdate()}_nextMonth(){this._current=new Date(this._current.getFullYear(),this._current.getMonth()+1,1),this.selectedDate="",this._popupEvent=null,this._syncDisplayFromCurrent(),this.requestUpdate()}_showEventPopup(t){var e;this._popupEvent=t,this.selectedDate=t.date,this._dispatchSelect(t.date),this._lastActiveDay=((e=this.shadowRoot)==null?void 0:e.activeElement)||document.activeElement,this.requestUpdate(),this.updateComplete.then(()=>{var s;const i=(s=this.shadowRoot)==null?void 0:s.querySelector("scb-dialog");i&&(document.activeElement&&(i.__lastTriggerEl=document.activeElement),requestAnimationFrame(()=>{requestAnimationFrame(()=>{i.open=!0})}),i.addEventListener("close",this._restoreDayFocus,{once:!0}));const r=o=>{var n;(n=o.target)!=null&&n.closest(".event-popup")||this._closePopup()};window.addEventListener("mousedown",r,{once:!0})})}_closePopup(){var e;const t=(e=this.shadowRoot)==null?void 0:e.querySelector("scb-dialog");t&&t.removeAttribute("open"),this._popupEvent=null,this.requestUpdate()}_addDays(t,e){const i=new Date(t.valueOf());return i.setDate(i.getDate()+e),i}_easterDay(t){if(typeof this._easterDateCalculated["Ar"+t]<"u")return new Date(this._easterDateCalculated["Ar"+t]);let e=t;e<100&&(e=e+1900),e<1950&&(e=e+100);const i=e%19,r=e%4,s=e%7,o=(19*i+24)%30,n=(2*r+4*s+6*o+5)%7;let l=22+o+n,d=0;l==57&&(l-=7),l==56&&o==28&&n==6&&i>10&&(l-=7),l>31?(l-=31,d=4):d=3;const u=new Date(e,d-1,l);return this._easterDateCalculated["Ar"+t]=u,new Date(this._easterDateCalculated["Ar"+t])}_swedishHolidayName(t){const e=t.getMonth();if(e===1||e===6||e===7||e===8)return null;const i=t.getMonth()+1,r=t.getDate(),s=t.getFullYear(),o=this._easterDay(s),n=this.lang==="en",l=[["Nyårsdagen","New Year's Day",i===1&&r===1],["Trettondedag jul","Epiphany",i===1&&r===6],["Långfredag","Good Friday",+t==+this._addDays(o,-2)],["Påskdagen","Easter Sunday",+t==+o],["Annandag påsk","Easter Monday",+t==+this._addDays(o,1)],["Kristi himmelsfärdsdag","Ascension Day",+t==+this._addDays(o,39)],["Pingstdagen","Pentecost",+t==+this._addDays(o,50)&&s<2005],["Första maj","May Day",i===5&&r===1],["Nationaldagen","National Day",i===6&&r===6&&s>=2005],["Midsommarafton","Midsummer's Eve",i===6&&r>=19&&r<=25&&t.getDay()===5],["Midsommardagen","Midsummer's Day",i===6&&r>=20&&r<=26&&t.getDay()===6],["Julafton","Christmas Eve",i===12&&r===24],["Juldagen","Christmas Day",i===12&&r===25],["Annandag jul","Boxing Day",i===12&&r===26],["Alla helgons dag","All Saints' Day",i===10&&r>=31&&t.getDay()===6||i===11&&r<=6&&t.getDay()===6]];for(const d of l){const[u,v,b]=d;if(b)return n?v:u}return null}render(){const t=this._current.getFullYear(),e=this._current.getMonth(),i=this._daysInMonth(t,e),r=this._firstDayOfWeek(t,e),s=this._today,o=this.lang==="en",n=o?["January","February","March","April","May","June","July","August","September","October","November","December"]:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"];let l=o?["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]:["Mån","Tis","Ons","Tor","Fre","Lör","Sön"];this.disableWeekend&&(l=l.slice(0,5));const d=this._getEventInputs(),u=d?this._buildEventMapFromInputs(d):this._buildEventMapFromChildren(),v=[];let b=1;for(let m=0;m<6;m++){const _=[],x=this.disableWeekend?[0,1,2,3,4]:[0,1,2,3,4,5,6];let w=b;for(let S=0;S<x.length;S++){const T=x[S];if(m===0&&T<r){if(!this.disableWeekend||T<5){const k=e===0?11:e-1,M=e===0?t-1:t,j=this._daysInMonth(M,k)-(r-T-1);_.push(c`
4758
+ `,X([a({type:Boolean,reflect:!0})],W.prototype,"open",2),X([a({type:Number,attribute:"z-index"})],W.prototype,"zIndex",2),X([a({type:Boolean,attribute:!1})],W.prototype,"inSb",2),X([a({type:Boolean,attribute:"scrim-close"})],W.prototype,"scrimClose",2),X([a({type:String,reflect:!0})],W.prototype,"spacing",2),X([a({type:String,attribute:"spacing-top",reflect:!0})],W.prototype,"spacingTop",2),X([a({type:String,attribute:"spacing-bottom",reflect:!0})],W.prototype,"spacingBottom",2),X([a({type:String,attribute:"spacing-left",reflect:!0})],W.prototype,"spacingLeft",2),X([a({type:String,attribute:"spacing-right",reflect:!0})],W.prototype,"spacingRight",2),X([a({type:String})],W.prototype,"variant",2),X([a({type:String})],W.prototype,"label",2),X([a({type:String})],W.prototype,"icon",2),X([a({type:String,attribute:"supporting-text"})],W.prototype,"supportingText",2),X([a({type:String,attribute:"ok-button"})],W.prototype,"okButton",2),X([a({type:String,attribute:"cancel-button"})],W.prototype,"cancelButton",2),X([a({type:String,attribute:"delete-button"})],W.prototype,"deleteButton",2),X([a({type:String,attribute:"confirm-button"})],W.prototype,"confirmButton",2),X([a({type:String,attribute:"deny-button"})],W.prototype,"denyButton",2),X([a({type:String,attribute:"reset-button"})],W.prototype,"resetButton",2),X([a({type:String,attribute:"submit-button"})],W.prototype,"submitButton",2),X([a({type:String,attribute:"form-id"})],W.prototype,"formId",2),X([a({type:String,attribute:"form-action"})],W.prototype,"formAction",2),X([a({type:String,attribute:"form-method"})],W.prototype,"formMethod",2),W=X([g("scb-dialog")],W);var Gb=Object.defineProperty,Yb=Object.getOwnPropertyDescriptor,Ud=t=>{throw TypeError(t)},st=(t,e,i,r)=>{for(var s=r>1?void 0:r?Yb(e,i):e,o=t.length-1,n;o>=0;o--)(n=t[o])&&(s=(r?n(e,i,s):n(s))||s);return r&&s&&Gb(e,i,s),s},Xb=(t,e,i)=>e.has(t)||Ud("Cannot "+i),Jb=(t,e,i)=>e.has(t)?Ud("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),jd=(t,e,i)=>(Xb(t,e,"access private method"),i),ua,gl;let Re=class extends y{constructor(){super(...arguments),Jb(this,ua),this._lastActiveDay=null,this.lang="sv",this.disableWeekend=!1,this.publicHolidays=!0,this.displayYear=new Date().getFullYear(),this.displayMonth=new Date().getMonth()+1,this.selectedDate="",this.eventsJson=void 0,this._eventsFromJson=null,this._eventsJsonLast=void 0,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._mutationObserver=null,this._syncingDisplay=!1,this._onCalendarKeyDown=t=>{var d,u;const i=Array.from(((d=this.shadowRoot)==null?void 0:d.querySelectorAll(".calendar-day.has-event"))??[]),r=(u=this.shadowRoot)==null?void 0:u.activeElement,s=r&&i.includes(r)?r:document.activeElement,o=i.indexOf(s);if(o===-1)return;let n=o;const l=this.disableWeekend?5:7;switch(t.key){case"ArrowRight":n=o+1<i.length?o+1:o;break;case"ArrowLeft":n=o-1>=0?o-1:o;break;case"ArrowDown":n=o+l<i.length?o+l:o;break;case"ArrowUp":n=o-l>=0?o-l:o;break;default:return}n!==o&&(t.preventDefault(),i[n].focus())},this._onEventChanged=()=>{this.requestUpdate()},this._today=new Date,this._current=new Date,this._popupEvent=null,this._restoreDayFocus=()=>{this._lastActiveDay&&setTimeout(()=>{var t;(t=this._lastActiveDay)==null||t.focus(),this._lastActiveDay=null},0)},this._easterDateCalculated={}}get value(){return this.selectedDate}set value(t){const e=(t??"")+"";e!==this.selectedDate&&(this.selectedDate=e)}static get observedAttributes(){return[...super.observedAttributes??[],"value"]}attributeChangedCallback(t,e,i){super.attributeChangedCallback(t,e,i),t==="value"&&(this.value=i??"")}connectedCallback(){super.connectedCallback(),jd(this,ua,gl).call(this);const t=Number(this.displayYear),e=Number(this.displayMonth);!Number.isNaN(t)&&!Number.isNaN(e)&&e>=1&&e<=12&&(this._current=new Date(t,e-1,1)),this._syncDisplayFromCurrent(!1),this.addEventListener("change",this._onEventChanged),this._mutationObserver=new MutationObserver(()=>{this.requestUpdate()}),this._mutationObserver.observe(this,{childList:!0}),this.addEventListener("keydown",this._onCalendarKeyDown)}disconnectedCallback(){this.removeEventListener("change",this._onEventChanged),super.disconnectedCallback(),this._mutationObserver&&(this._mutationObserver.disconnect(),this._mutationObserver=null),this.removeEventListener("keydown",this._onCalendarKeyDown)}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}updated(t){var e;if((e=super.updated)==null||e.call(this,t),t.has("eventsJson")&&(this._eventsJsonLast=void 0,this._eventsFromJson=null),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&jd(this,ua,gl).call(this),!this._syncingDisplay&&(t.has("displayYear")||t.has("displayMonth"))){const i=Number(this.displayYear),r=Number(this.displayMonth);if(!Number.isNaN(i)&&!Number.isNaN(r)&&r>=1&&r<=12){const s=this._current.getFullYear(),o=this._current.getMonth()+1;(s!==i||o!==r)&&(this._current=new Date(i,r-1,1),this._dispatchMonthChange(i,r),this.requestUpdate())}}}_ensureEventsFromJson(){const t=(this.eventsJson??"").trim();if(!t){this._eventsFromJson=null,this._eventsJsonLast=t;return}if(!(this._eventsJsonLast===t&&this._eventsFromJson!==null)){this._eventsJsonLast=t;try{const e=JSON.parse(t);Array.isArray(e)?this._eventsFromJson=e:this._eventsFromJson=[]}catch{this._eventsFromJson=[]}}}_getEventInputs(){return Array.isArray(this.events)?this.events:(this._ensureEventsFromJson(),this._eventsFromJson!==null?this._eventsFromJson:null)}_normalizeEventInput(t){const e=t.title??"",i=t.description??"",r=t.startDate??t["start-date"]??t.start??t.date??"",s=t.endDate??t["end-date"]??t.end??"";return{title:e+"",description:i?i+"":void 0,start:r?r+"":void 0,end:s?s+"":void 0}}_buildEventMapFromInputs(t){const e=new Map;for(const i of t){const r=this._normalizeEventInput(i),s=r.start||"",o=r.end||"";if(!(!s||!r.title))if(s&&o){const n=new Date(s),l=new Date(o);for(let d=new Date(n);d<=l;d.setDate(d.getDate()+1)){const u=d.toISOString().split("T")[0],v=e.get(u)||[];v.push({title:r.title,description:r.description,start:s,end:o}),e.set(u,v)}}else{const n=s.split("T")[0],l=e.get(n)||[];l.push({title:r.title,description:r.description,start:s}),e.set(n,l)}}return e}_buildEventMapFromChildren(){const t=Array.from(this.querySelectorAll("scb-calendar-event")),e=new Map;for(const i of t){const r=i,s=(r.startDate??r.date??"")+""||i.getAttribute("start-date")||i.getAttribute("date")||"",o=(r.endDate??"")+""||i.getAttribute("end-date")||"";if(s&&o){const n=new Date(s),l=new Date(o);for(let d=new Date(n);d<=l;d.setDate(d.getDate()+1)){const u=d.toISOString().split("T")[0],v=e.get(u)||[];v.push({title:i.title??"",description:i.description,start:s,end:o}),e.set(u,v)}}else if(s&&i.title){const n=s.split("T")[0],l=e.get(n)||[];l.push({title:i.title,description:i.description,start:s}),e.set(n,l)}}return e}_syncDisplayFromCurrent(t=!0){const e=this._current.getFullYear(),i=this._current.getMonth()+1;this._syncingDisplay=!0;try{this.displayYear=e,this.displayMonth=i}finally{this._syncingDisplay=!1}t&&this._dispatchMonthChange(e,i)}_dispatchMonthChange(t,e){const i={displayYear:t,displayMonth:e};this.dispatchEvent(new CustomEvent("scb-calendar-month-change",{bubbles:!0,composed:!0,detail:i})),this.dispatchEvent(new CustomEvent("scbcalendarmonthchange",{bubbles:!0,composed:!0,detail:i}))}_dispatchSelect(t){const e={selectedDate:t};this.dispatchEvent(new CustomEvent("scb-calendar-select",{bubbles:!0,composed:!0,detail:e})),this.dispatchEvent(new CustomEvent("scbcalendarselect",{bubbles:!0,composed:!0,detail:e}))}_daysInMonth(t,e){return new Date(t,e+1,0).getDate()}_firstDayOfWeek(t,e){const i=new Date(t,e,1).getDay();return i===0?6:i-1}_prevMonth(){this._current=new Date(this._current.getFullYear(),this._current.getMonth()-1,1),this.selectedDate="",this._popupEvent=null,this._syncDisplayFromCurrent(),this.requestUpdate()}_nextMonth(){this._current=new Date(this._current.getFullYear(),this._current.getMonth()+1,1),this.selectedDate="",this._popupEvent=null,this._syncDisplayFromCurrent(),this.requestUpdate()}_showEventPopup(t){var e;this._popupEvent=t,this.selectedDate=t.date,this._dispatchSelect(t.date),this._lastActiveDay=((e=this.shadowRoot)==null?void 0:e.activeElement)||document.activeElement,this.requestUpdate(),this.updateComplete.then(()=>{var s;const i=(s=this.shadowRoot)==null?void 0:s.querySelector("scb-dialog");i&&(document.activeElement&&(i.__lastTriggerEl=document.activeElement),requestAnimationFrame(()=>{requestAnimationFrame(()=>{i.open=!0})}),i.addEventListener("close",this._restoreDayFocus,{once:!0}));const r=o=>{var n;(n=o.target)!=null&&n.closest(".event-popup")||this._closePopup()};window.addEventListener("mousedown",r,{once:!0})})}_closePopup(){var e;const t=(e=this.shadowRoot)==null?void 0:e.querySelector("scb-dialog");t&&t.removeAttribute("open"),this._popupEvent=null,this.requestUpdate()}_addDays(t,e){const i=new Date(t.valueOf());return i.setDate(i.getDate()+e),i}_easterDay(t){if(typeof this._easterDateCalculated["Ar"+t]<"u")return new Date(this._easterDateCalculated["Ar"+t]);let e=t;e<100&&(e=e+1900),e<1950&&(e=e+100);const i=e%19,r=e%4,s=e%7,o=(19*i+24)%30,n=(2*r+4*s+6*o+5)%7;let l=22+o+n,d=0;l==57&&(l-=7),l==56&&o==28&&n==6&&i>10&&(l-=7),l>31?(l-=31,d=4):d=3;const u=new Date(e,d-1,l);return this._easterDateCalculated["Ar"+t]=u,new Date(this._easterDateCalculated["Ar"+t])}_swedishHolidayName(t){const e=t.getMonth();if(e===1||e===6||e===7||e===8)return null;const i=t.getMonth()+1,r=t.getDate(),s=t.getFullYear(),o=this._easterDay(s),n=this.lang==="en",l=[["Nyårsdagen","New Year's Day",i===1&&r===1],["Trettondedag jul","Epiphany",i===1&&r===6],["Långfredag","Good Friday",+t==+this._addDays(o,-2)],["Påskdagen","Easter Sunday",+t==+o],["Annandag påsk","Easter Monday",+t==+this._addDays(o,1)],["Kristi himmelsfärdsdag","Ascension Day",+t==+this._addDays(o,39)],["Pingstdagen","Pentecost",+t==+this._addDays(o,50)&&s<2005],["Första maj","May Day",i===5&&r===1],["Nationaldagen","National Day",i===6&&r===6&&s>=2005],["Midsommarafton","Midsummer's Eve",i===6&&r>=19&&r<=25&&t.getDay()===5],["Midsommardagen","Midsummer's Day",i===6&&r>=20&&r<=26&&t.getDay()===6],["Julafton","Christmas Eve",i===12&&r===24],["Juldagen","Christmas Day",i===12&&r===25],["Annandag jul","Boxing Day",i===12&&r===26],["Alla helgons dag","All Saints' Day",i===10&&r>=31&&t.getDay()===6||i===11&&r<=6&&t.getDay()===6]];for(const d of l){const[u,v,b]=d;if(b)return n?v:u}return null}render(){const t=this._current.getFullYear(),e=this._current.getMonth(),i=this._daysInMonth(t,e),r=this._firstDayOfWeek(t,e),s=this._today,o=this.lang==="en",n=o?["January","February","March","April","May","June","July","August","September","October","November","December"]:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"];let l=o?["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]:["Mån","Tis","Ons","Tor","Fre","Lör","Sön"];this.disableWeekend&&(l=l.slice(0,5));const d=this._getEventInputs(),u=d?this._buildEventMapFromInputs(d):this._buildEventMapFromChildren(),v=[];let b=1;for(let m=0;m<6;m++){const _=[],x=this.disableWeekend?[0,1,2,3,4]:[0,1,2,3,4,5,6];let w=b;for(let S=0;S<x.length;S++){const T=x[S];if(m===0&&T<r){if(!this.disableWeekend||T<5){const k=e===0?11:e-1,M=e===0?t-1:t,j=this._daysInMonth(M,k)-(r-T-1);_.push(c`
4759
4759
  <div class="calendar-day calendar-day--other">
4760
4760
  <span class="calendar-day-number">${j}</span>
4761
4761
  </div>
@@ -4910,7 +4910,7 @@ ${this.value}</textarea
4910
4910
  gap: var(--spacing-4);
4911
4911
  }
4912
4912
 
4913
- `,st([a({type:String})],Re.prototype,"lang",2),st([a({type:Boolean,attribute:"disable-weekend"})],Re.prototype,"disableWeekend",2),st([a({type:Boolean,attribute:"public-holidays"})],Re.prototype,"publicHolidays",2),st([a({type:Number,attribute:"display-year",reflect:!0})],Re.prototype,"displayYear",2),st([a({type:Number,attribute:"display-month",reflect:!0})],Re.prototype,"displayMonth",2),st([a({type:String,attribute:"selected-date",reflect:!0})],Re.prototype,"selectedDate",2),st([a({attribute:!1})],Re.prototype,"events",2),st([a({type:String,attribute:"events-json"})],Re.prototype,"eventsJson",2),st([a({type:String,reflect:!0})],Re.prototype,"spacing",2),st([a({type:String,attribute:"spacing-top",reflect:!0})],Re.prototype,"spacingTop",2),st([a({type:String,attribute:"spacing-bottom",reflect:!0})],Re.prototype,"spacingBottom",2),st([a({type:String,attribute:"spacing-left",reflect:!0})],Re.prototype,"spacingLeft",2),st([a({type:String,attribute:"spacing-right",reflect:!0})],Re.prototype,"spacingRight",2),Re=st([g("scb-calendar")],Re);var Zb=Object.defineProperty,Qb=Object.getOwnPropertyDescriptor,Kd=t=>{throw TypeError(t)},X=(t,e,i,r)=>{for(var s=r>1?void 0:r?Qb(e,i):e,o=t.length-1,n;o>=0;o--)(n=t[o])&&(s=(r?n(e,i,s):n(s))||s);return r&&s&&Zb(e,i,s),s},em=(t,e,i)=>e.has(t)||Kd("Cannot "+i),tm=(t,e,i)=>e.has(t)?Kd("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),Gd=(t,e,i)=>(em(t,e,"access private method"),i),va,yl;let F=class extends y{constructor(){super(...arguments),tm(this,va),this.variant="default",this.direction="horizontal",this.title="",this.subtitle="",this.supportingText="",this.cardHref="",this.cardHrefNav="",this.showMedia=null,this.mediaWidth="",this.mediaHeight="",this.mediaAspect="",this.width="",this.maxWidth="",this.minWidth="",this.height="",this.maxHeight="",this.minHeight="",this.sizing="stretch",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0}async firstUpdated(){F.__iconLoaded||(await Promise.resolve().then(()=>li),F.__iconLoaded=!0),F.__rippleLoaded||(await Promise.resolve().then(()=>ho),F.__rippleLoaded=!0),this.__applyInnerSizing(),Gd(this,va,yl).call(this)}render(){const t=this.variant?`${this.variant.toLowerCase()}`:"",e=this.direction?`${this.direction.toLowerCase()}`:"",i=this.cardHref?"clickable":"",r=1,s="Jan",o=this.mediaWidth&&this.mediaWidth.trim()!==""?this.mediaWidth:"",n=this.mediaHeight&&this.mediaHeight.trim()!==""?this.mediaHeight:"",l=this.mediaAspect&&this.mediaAspect.trim()!==""?this.mediaAspect:"",d=`${o?`inline-size:${o};`:""}${n?`block-size:${n};`:""}${l?`aspect-ratio:${l};`:""}`;return c`
4913
+ `,st([a({type:String})],Re.prototype,"lang",2),st([a({type:Boolean,attribute:"disable-weekend"})],Re.prototype,"disableWeekend",2),st([a({type:Boolean,attribute:"public-holidays"})],Re.prototype,"publicHolidays",2),st([a({type:Number,attribute:"display-year",reflect:!0})],Re.prototype,"displayYear",2),st([a({type:Number,attribute:"display-month",reflect:!0})],Re.prototype,"displayMonth",2),st([a({type:String,attribute:"selected-date",reflect:!0})],Re.prototype,"selectedDate",2),st([a({attribute:!1})],Re.prototype,"events",2),st([a({type:String,attribute:"events-json"})],Re.prototype,"eventsJson",2),st([a({type:String,reflect:!0})],Re.prototype,"spacing",2),st([a({type:String,attribute:"spacing-top",reflect:!0})],Re.prototype,"spacingTop",2),st([a({type:String,attribute:"spacing-bottom",reflect:!0})],Re.prototype,"spacingBottom",2),st([a({type:String,attribute:"spacing-left",reflect:!0})],Re.prototype,"spacingLeft",2),st([a({type:String,attribute:"spacing-right",reflect:!0})],Re.prototype,"spacingRight",2),Re=st([g("scb-calendar")],Re);var Zb=Object.defineProperty,Qb=Object.getOwnPropertyDescriptor,Kd=t=>{throw TypeError(t)},J=(t,e,i,r)=>{for(var s=r>1?void 0:r?Qb(e,i):e,o=t.length-1,n;o>=0;o--)(n=t[o])&&(s=(r?n(e,i,s):n(s))||s);return r&&s&&Zb(e,i,s),s},em=(t,e,i)=>e.has(t)||Kd("Cannot "+i),tm=(t,e,i)=>e.has(t)?Kd("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),Gd=(t,e,i)=>(em(t,e,"access private method"),i),va,yl;let F=class extends y{constructor(){super(...arguments),tm(this,va),this.variant="default",this.direction="horizontal",this.title="",this.subtitle="",this.supportingText="",this.cardHref="",this.cardHrefNav="",this.showMedia=null,this.mediaWidth="",this.mediaHeight="",this.mediaAspect="",this.width="",this.maxWidth="",this.minWidth="",this.height="",this.maxHeight="",this.minHeight="",this.sizing="stretch",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0}async firstUpdated(){F.__iconLoaded||(await Promise.resolve().then(()=>li),F.__iconLoaded=!0),F.__rippleLoaded||(await Promise.resolve().then(()=>ho),F.__rippleLoaded=!0),this.__applyInnerSizing(),Gd(this,va,yl).call(this)}render(){const t=this.variant?`${this.variant.toLowerCase()}`:"",e=this.direction?`${this.direction.toLowerCase()}`:"",i=this.cardHref?"clickable":"",r=1,s="Jan",o=this.mediaWidth&&this.mediaWidth.trim()!==""?this.mediaWidth:"",n=this.mediaHeight&&this.mediaHeight.trim()!==""?this.mediaHeight:"",l=this.mediaAspect&&this.mediaAspect.trim()!==""?this.mediaAspect:"",d=`${o?`inline-size:${o};`:""}${n?`block-size:${n};`:""}${l?`aspect-ratio:${l};`:""}`;return c`
4914
4914
  <div
4915
4915
  class="calendar-card ${e} ${i} ${t}"
4916
4916
  role="${this.cardHref?"link":"group"}"
@@ -5166,7 +5166,7 @@ ${this.value}</textarea
5166
5166
  overflow: visible;
5167
5167
  text-overflow: clip;
5168
5168
  }
5169
- `,X([a({type:String,reflect:!0})],F.prototype,"variant",2),X([a({type:String,reflect:!0})],F.prototype,"direction",2),X([a({type:String,reflect:!0})],F.prototype,"title",2),X([a({type:String,reflect:!0})],F.prototype,"subtitle",2),X([a({type:String,attribute:"supporting-text",reflect:!0})],F.prototype,"supportingText",2),X([a({type:String,attribute:"card-href"})],F.prototype,"cardHref",2),X([a({type:String,attribute:"card-href-nav"})],F.prototype,"cardHrefNav",2),X([a({type:Boolean,reflect:!0,attribute:"show-media"})],F.prototype,"showMedia",2),X([a({type:String,attribute:"media-width"})],F.prototype,"mediaWidth",2),X([a({type:String,attribute:"media-height"})],F.prototype,"mediaHeight",2),X([a({type:String,attribute:"media-aspect"})],F.prototype,"mediaAspect",2),X([a({type:String,reflect:!0})],F.prototype,"width",2),X([a({type:String,reflect:!0,attribute:"max-width"})],F.prototype,"maxWidth",2),X([a({type:String,attribute:"min-width"})],F.prototype,"minWidth",2),X([a({type:String,reflect:!0})],F.prototype,"height",2),X([a({type:String,reflect:!0,attribute:"max-height"})],F.prototype,"maxHeight",2),X([a({type:String,attribute:"min-height"})],F.prototype,"minHeight",2),X([a({type:String,reflect:!0})],F.prototype,"sizing",2),X([a({type:String,reflect:!0})],F.prototype,"spacing",2),X([a({type:String,attribute:"spacing-top",reflect:!0})],F.prototype,"spacingTop",2),X([a({type:String,attribute:"spacing-bottom",reflect:!0})],F.prototype,"spacingBottom",2),X([a({type:String,attribute:"spacing-left",reflect:!0})],F.prototype,"spacingLeft",2),X([a({type:String,attribute:"spacing-right",reflect:!0})],F.prototype,"spacingRight",2),F=X([g("scb-calendar-card")],F);/**
5169
+ `,J([a({type:String,reflect:!0})],F.prototype,"variant",2),J([a({type:String,reflect:!0})],F.prototype,"direction",2),J([a({type:String,reflect:!0})],F.prototype,"title",2),J([a({type:String,reflect:!0})],F.prototype,"subtitle",2),J([a({type:String,attribute:"supporting-text",reflect:!0})],F.prototype,"supportingText",2),J([a({type:String,attribute:"card-href"})],F.prototype,"cardHref",2),J([a({type:String,attribute:"card-href-nav"})],F.prototype,"cardHrefNav",2),J([a({type:Boolean,reflect:!0,attribute:"show-media"})],F.prototype,"showMedia",2),J([a({type:String,attribute:"media-width"})],F.prototype,"mediaWidth",2),J([a({type:String,attribute:"media-height"})],F.prototype,"mediaHeight",2),J([a({type:String,attribute:"media-aspect"})],F.prototype,"mediaAspect",2),J([a({type:String,reflect:!0})],F.prototype,"width",2),J([a({type:String,reflect:!0,attribute:"max-width"})],F.prototype,"maxWidth",2),J([a({type:String,attribute:"min-width"})],F.prototype,"minWidth",2),J([a({type:String,reflect:!0})],F.prototype,"height",2),J([a({type:String,reflect:!0,attribute:"max-height"})],F.prototype,"maxHeight",2),J([a({type:String,attribute:"min-height"})],F.prototype,"minHeight",2),J([a({type:String,reflect:!0})],F.prototype,"sizing",2),J([a({type:String,reflect:!0})],F.prototype,"spacing",2),J([a({type:String,attribute:"spacing-top",reflect:!0})],F.prototype,"spacingTop",2),J([a({type:String,attribute:"spacing-bottom",reflect:!0})],F.prototype,"spacingBottom",2),J([a({type:String,attribute:"spacing-left",reflect:!0})],F.prototype,"spacingLeft",2),J([a({type:String,attribute:"spacing-right",reflect:!0})],F.prototype,"spacingRight",2),F=J([g("scb-calendar-card")],F);/**
5170
5170
  * @license
5171
5171
  * Copyright 2017 Google LLC
5172
5172
  * SPDX-License-Identifier: BSD-3-Clause
@@ -8746,7 +8746,7 @@ ${this.value}</textarea
8746
8746
  color: var(--md-sys-color-on-secondary-container);
8747
8747
  font-weight: 600;
8748
8748
  }
8749
- `,_t([a({type:String})],Ke.prototype,"label",2),_t([a({type:String,attribute:"active-href"})],Ke.prototype,"activeHref",2),_t([a({type:Boolean,attribute:"activate-on-click"})],Ke.prototype,"activateOnClick",2),_t([a({type:Boolean,reflect:!0})],Ke.prototype,"sticky",2),_t([a({type:String,attribute:"sticky-top"})],Ke.prototype,"stickyTop",2),_t([a({type:Number,attribute:"sticky-z-index"})],Ke.prototype,"stickyZIndex",2),_t([a({type:String,attribute:"sticky-background"})],Ke.prototype,"stickyBackground",2),_t([a({type:String,reflect:!0})],Ke.prototype,"spacing",2),_t([a({type:String,attribute:"spacing-top",reflect:!0})],Ke.prototype,"spacingTop",2),_t([a({type:String,attribute:"spacing-bottom",reflect:!0})],Ke.prototype,"spacingBottom",2),_t([a({type:String,attribute:"spacing-left",reflect:!0})],Ke.prototype,"spacingLeft",2),_t([a({type:String,attribute:"spacing-right",reflect:!0})],Ke.prototype,"spacingRight",2),Ke=_t([g("scb-nav")],Ke);var Af=Object.defineProperty,zf=Object.getOwnPropertyDescriptor,J=(t,e,i,r)=>{for(var s=r>1?void 0:r?zf(e,i):e,o=t.length-1,n;o>=0;o--)(n=t[o])&&(s=(r?n(e,i,s):n(s))||s);return r&&s&&Af(e,i,s),s};let W=class extends y{constructor(){super(...arguments),this.variant="success",this.direction="horizontal",this.title="",this.subtitle="",this.supportingText="",this.open=!1,this.linkText="",this.linkHref="#",this.href="",this.showIcon=!1,this.showCloseButton=!1,this.sizing="stretch",this.width="",this.maxWidth="",this.height="",this.maxHeight="",this.fullHeight=!1,this.fullWidth=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._closeNotification=()=>{this.open=!1;const t=new CustomEvent("close",{detail:{open:this.open},bubbles:!0,composed:!0});this.dispatchEvent(t);const e=new CustomEvent("Close",{detail:{open:this.open},bubbles:!0,composed:!0});this.dispatchEvent(e)}}_iconForVariant(){switch(this.variant){case"success":return"check_circle";case"error":return"error";case"warning":return"warning";case"info":default:return"info"}}__resolveSpacingToken(t){const e=(t??"").trim();return e?/^\d+$/.test(e)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(e,10)))})`:e:""}__applySpacing(){const t=this.__resolveSpacingToken(this.spacingTop||this.spacing),e=this.__resolveSpacingToken(this.spacingBottom||this.spacing),i=this.__resolveSpacingToken(this.spacingLeft||this.spacing),r=this.__resolveSpacingToken(this.spacingRight||this.spacing);t?this.style.marginBlockStart=t:this.style.removeProperty("margin-block-start"),e?this.style.marginBlockEnd=e:this.style.removeProperty("margin-block-end"),i?this.style.marginInlineStart=i:this.style.removeProperty("margin-inline-start"),r?this.style.marginInlineEnd=r:this.style.removeProperty("margin-inline-end")}updated(t){super.updated(t),t.has("width")&&(this.width&&this.width.trim()!==""?this.style.inlineSize=this.width:this.style.removeProperty("inline-size")),t.has("maxWidth")&&(this.maxWidth&&this.maxWidth.trim()!==""?this.style.maxInlineSize=this.maxWidth:this.style.removeProperty("max-inline-size")),t.has("height")&&(this.height&&this.height.trim()!==""?this.style.blockSize=this.height:this.style.removeProperty("block-size")),t.has("maxHeight")&&(this.maxHeight&&this.maxHeight.trim()!==""?this.style.maxBlockSize=this.maxHeight:this.style.removeProperty("max-block-size")),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&this.__applySpacing()}render(){const t=this.direction==="vertical"?"vertical":"horizontal",e=this.variant==="success"?"--_icon-color: var(--md-sys-color-on-success-container, #007041);":this.variant==="error"?"--_icon-color: var(--md-sys-color-on-error-container, #942500);":this.variant==="warning"?"--_icon-color: var(--md-sys-color-on-warning-container, #6B5600);":"--_icon-color: var(--md-sys-color-on-info-container, #1E00BE);",i=this.linkHref&&this.linkHref!=="#"?this.linkHref:this.href||this.linkHref;return c`
8749
+ `,_t([a({type:String})],Ke.prototype,"label",2),_t([a({type:String,attribute:"active-href"})],Ke.prototype,"activeHref",2),_t([a({type:Boolean,attribute:"activate-on-click"})],Ke.prototype,"activateOnClick",2),_t([a({type:Boolean,reflect:!0})],Ke.prototype,"sticky",2),_t([a({type:String,attribute:"sticky-top"})],Ke.prototype,"stickyTop",2),_t([a({type:Number,attribute:"sticky-z-index"})],Ke.prototype,"stickyZIndex",2),_t([a({type:String,attribute:"sticky-background"})],Ke.prototype,"stickyBackground",2),_t([a({type:String,reflect:!0})],Ke.prototype,"spacing",2),_t([a({type:String,attribute:"spacing-top",reflect:!0})],Ke.prototype,"spacingTop",2),_t([a({type:String,attribute:"spacing-bottom",reflect:!0})],Ke.prototype,"spacingBottom",2),_t([a({type:String,attribute:"spacing-left",reflect:!0})],Ke.prototype,"spacingLeft",2),_t([a({type:String,attribute:"spacing-right",reflect:!0})],Ke.prototype,"spacingRight",2),Ke=_t([g("scb-nav")],Ke);var Af=Object.defineProperty,zf=Object.getOwnPropertyDescriptor,Z=(t,e,i,r)=>{for(var s=r>1?void 0:r?zf(e,i):e,o=t.length-1,n;o>=0;o--)(n=t[o])&&(s=(r?n(e,i,s):n(s))||s);return r&&s&&Af(e,i,s),s};let U=class extends y{constructor(){super(...arguments),this.variant="success",this.direction="horizontal",this.title="",this.subtitle="",this.supportingText="",this.open=!1,this.linkText="",this.linkHref="#",this.href="",this.showIcon=!1,this.showCloseButton=!1,this.sizing="stretch",this.width="",this.maxWidth="",this.height="",this.maxHeight="",this.fullHeight=!1,this.fullWidth=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._closeNotification=()=>{this.open=!1;const t=new CustomEvent("close",{detail:{open:this.open},bubbles:!0,composed:!0});this.dispatchEvent(t);const e=new CustomEvent("Close",{detail:{open:this.open},bubbles:!0,composed:!0});this.dispatchEvent(e)}}_iconForVariant(){switch(this.variant){case"success":return"check_circle";case"error":return"error";case"warning":return"warning";case"info":default:return"info"}}__resolveSpacingToken(t){const e=(t??"").trim();return e?/^\d+$/.test(e)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(e,10)))})`:e:""}__applySpacing(){const t=this.__resolveSpacingToken(this.spacingTop||this.spacing),e=this.__resolveSpacingToken(this.spacingBottom||this.spacing),i=this.__resolveSpacingToken(this.spacingLeft||this.spacing),r=this.__resolveSpacingToken(this.spacingRight||this.spacing);t?this.style.marginBlockStart=t:this.style.removeProperty("margin-block-start"),e?this.style.marginBlockEnd=e:this.style.removeProperty("margin-block-end"),i?this.style.marginInlineStart=i:this.style.removeProperty("margin-inline-start"),r?this.style.marginInlineEnd=r:this.style.removeProperty("margin-inline-end")}updated(t){super.updated(t),t.has("width")&&(this.width&&this.width.trim()!==""?this.style.inlineSize=this.width:this.style.removeProperty("inline-size")),t.has("maxWidth")&&(this.maxWidth&&this.maxWidth.trim()!==""?this.style.maxInlineSize=this.maxWidth:this.style.removeProperty("max-inline-size")),t.has("height")&&(this.height&&this.height.trim()!==""?this.style.blockSize=this.height:this.style.removeProperty("block-size")),t.has("maxHeight")&&(this.maxHeight&&this.maxHeight.trim()!==""?this.style.maxBlockSize=this.maxHeight:this.style.removeProperty("max-block-size")),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&this.__applySpacing()}render(){const t=this.direction==="vertical"?"vertical":"horizontal",e=this.variant==="success"?"--_icon-color: var(--md-sys-color-on-success-container, #007041);":this.variant==="error"?"--_icon-color: var(--md-sys-color-on-error-container, #942500);":this.variant==="warning"?"--_icon-color: var(--md-sys-color-on-warning-container, #6B5600);":"--_icon-color: var(--md-sys-color-on-info-container, #1E00BE);",i=this.linkHref&&this.linkHref!=="#"?this.linkHref:this.href||this.linkHref;return c`
8750
8750
  <div class="notification" type=${this.variant} role="alert" aria-live="assertive" aria-atomic="true">
8751
8751
  <div class="notification-main ${t}">
8752
8752
  ${this.showIcon?c`
@@ -8780,7 +8780,7 @@ ${this.value}</textarea
8780
8780
  `:null}
8781
8781
  </div>
8782
8782
  <md-focus-ring></md-focus-ring>
8783
- `}};W.styles=[f`
8783
+ `}};U.styles=[f`
8784
8784
  :host {
8785
8785
  display: block;
8786
8786
  position: relative;
@@ -9018,7 +9018,7 @@ ${this.value}</textarea
9018
9018
  box-shadow: 0 0 0 2px var(--md-sys-color-primary, #1976d2);
9019
9019
  }
9020
9020
  }
9021
- `],J([a({type:String})],W.prototype,"variant",2),J([a({type:String,reflect:!0})],W.prototype,"direction",2),J([a({type:String})],W.prototype,"title",2),J([a({type:String})],W.prototype,"subtitle",2),J([a({type:String,attribute:"supporting-text"})],W.prototype,"supportingText",2),J([a({type:Boolean,reflect:!0})],W.prototype,"open",2),J([a({type:String,attribute:"link-text"})],W.prototype,"linkText",2),J([a({type:String,attribute:"link-href"})],W.prototype,"linkHref",2),J([a({type:String})],W.prototype,"href",2),J([a({type:Boolean,attribute:"show-icon"})],W.prototype,"showIcon",2),J([a({type:Boolean,attribute:"show-close-button"})],W.prototype,"showCloseButton",2),J([a({type:String,reflect:!0})],W.prototype,"sizing",2),J([a({type:String,reflect:!0})],W.prototype,"width",2),J([a({type:String,reflect:!0,attribute:"max-width"})],W.prototype,"maxWidth",2),J([a({type:String,reflect:!0})],W.prototype,"height",2),J([a({type:String,reflect:!0,attribute:"max-height"})],W.prototype,"maxHeight",2),J([a({type:Boolean,reflect:!0,attribute:"full-height"})],W.prototype,"fullHeight",2),J([a({type:Boolean,reflect:!0,attribute:"full-width"})],W.prototype,"fullWidth",2),J([a({type:String})],W.prototype,"spacing",2),J([a({type:String,attribute:"spacing-top"})],W.prototype,"spacingTop",2),J([a({type:String,attribute:"spacing-bottom"})],W.prototype,"spacingBottom",2),J([a({type:String,attribute:"spacing-left"})],W.prototype,"spacingLeft",2),J([a({type:String,attribute:"spacing-right"})],W.prototype,"spacingRight",2),W=J([g("scb-notification-card")],W);var If=Object.defineProperty,Pf=Object.getOwnPropertyDescriptor,ct=(t,e,i,r)=>{for(var s=r>1?void 0:r?Pf(e,i):e,o=t.length-1,n;o>=0;o--)(n=t[o])&&(s=(r?n(e,i,s):n(s))||s);return r&&s&&If(e,i,s),s};let Me=class extends y{constructor(){super(...arguments),this.variant="icon-text",this.page=1,this.totalPages=0,this.pagingHref="",this.paginationAriaLabel="Paginering",this.currentAriaLabel="Nuvarande sida, ",this.pagingNumberAriaLabel="Gå till sida ",this.isNarrow=window.innerWidth<=768,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._onResize=()=>{this.isNarrow=window.innerWidth<=768}}_emitPageChange(t){const e={page:t};this.dispatchEvent(new CustomEvent("page-change",{detail:e,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("pagechange",{detail:e,bubbles:!0,composed:!0}))}_prevPage(){this.page>1&&this.page--,this._emitPageChange(this.page)}_nextPage(){this.page<this.totalPages&&this.page++,this._emitPageChange(this.page)}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this._onResize),this._onResize()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this._onResize)}mapSpacingToken(t){if(t==null)return;const e=String(t).trim();if(e)return/^\d+$/.test(e)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(e,10)))})`:e}__applySpacing(){const t=this.mapSpacingToken(this.spacing),e=this.mapSpacingToken(this.spacingTop)??t,i=this.mapSpacingToken(this.spacingBottom)??t,r=this.mapSpacingToken(this.spacingLeft),s=this.mapSpacingToken(this.spacingRight);e?this.style.setProperty("--scb-pagination-spacing-block-start",e):this.style.removeProperty("--scb-pagination-spacing-block-start"),i?this.style.setProperty("--scb-pagination-spacing-block-end",i):this.style.removeProperty("--scb-pagination-spacing-block-end"),r?this.style.setProperty("--scb-pagination-spacing-inline-start",r):this.style.removeProperty("--scb-pagination-spacing-inline-start"),s?this.style.setProperty("--scb-pagination-spacing-inline-end",s):this.style.removeProperty("--scb-pagination-spacing-inline-end")}firstUpdated(){this.__applySpacing()}updated(t){super.updated(t),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&this.__applySpacing()}render(){if(this.totalPages===0)return null;const t=this.variant?`${this.variant.toLowerCase()}`:"",e=[],{page:i,totalPages:r}=this,s=window.innerWidth<=768,o=s?1:2,n=l=>l===i?c`
9021
+ `],Z([a({type:String})],U.prototype,"variant",2),Z([a({type:String,reflect:!0})],U.prototype,"direction",2),Z([a({type:String})],U.prototype,"title",2),Z([a({type:String})],U.prototype,"subtitle",2),Z([a({type:String,attribute:"supporting-text"})],U.prototype,"supportingText",2),Z([a({type:Boolean,reflect:!0})],U.prototype,"open",2),Z([a({type:String,attribute:"link-text"})],U.prototype,"linkText",2),Z([a({type:String,attribute:"link-href"})],U.prototype,"linkHref",2),Z([a({type:String})],U.prototype,"href",2),Z([a({type:Boolean,attribute:"show-icon"})],U.prototype,"showIcon",2),Z([a({type:Boolean,attribute:"show-close-button"})],U.prototype,"showCloseButton",2),Z([a({type:String,reflect:!0})],U.prototype,"sizing",2),Z([a({type:String,reflect:!0})],U.prototype,"width",2),Z([a({type:String,reflect:!0,attribute:"max-width"})],U.prototype,"maxWidth",2),Z([a({type:String,reflect:!0})],U.prototype,"height",2),Z([a({type:String,reflect:!0,attribute:"max-height"})],U.prototype,"maxHeight",2),Z([a({type:Boolean,reflect:!0,attribute:"full-height"})],U.prototype,"fullHeight",2),Z([a({type:Boolean,reflect:!0,attribute:"full-width"})],U.prototype,"fullWidth",2),Z([a({type:String})],U.prototype,"spacing",2),Z([a({type:String,attribute:"spacing-top"})],U.prototype,"spacingTop",2),Z([a({type:String,attribute:"spacing-bottom"})],U.prototype,"spacingBottom",2),Z([a({type:String,attribute:"spacing-left"})],U.prototype,"spacingLeft",2),Z([a({type:String,attribute:"spacing-right"})],U.prototype,"spacingRight",2),U=Z([g("scb-notification-card")],U);var If=Object.defineProperty,Pf=Object.getOwnPropertyDescriptor,ct=(t,e,i,r)=>{for(var s=r>1?void 0:r?Pf(e,i):e,o=t.length-1,n;o>=0;o--)(n=t[o])&&(s=(r?n(e,i,s):n(s))||s);return r&&s&&If(e,i,s),s};let Me=class extends y{constructor(){super(...arguments),this.variant="icon-text",this.page=1,this.totalPages=0,this.pagingHref="",this.paginationAriaLabel="Paginering",this.currentAriaLabel="Nuvarande sida, ",this.pagingNumberAriaLabel="Gå till sida ",this.isNarrow=window.innerWidth<=768,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._onResize=()=>{this.isNarrow=window.innerWidth<=768}}_emitPageChange(t){const e={page:t};this.dispatchEvent(new CustomEvent("page-change",{detail:e,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("pagechange",{detail:e,bubbles:!0,composed:!0}))}_prevPage(){this.page>1&&this.page--,this._emitPageChange(this.page)}_nextPage(){this.page<this.totalPages&&this.page++,this._emitPageChange(this.page)}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this._onResize),this._onResize()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this._onResize)}mapSpacingToken(t){if(t==null)return;const e=String(t).trim();if(e)return/^\d+$/.test(e)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(e,10)))})`:e}__applySpacing(){const t=this.mapSpacingToken(this.spacing),e=this.mapSpacingToken(this.spacingTop)??t,i=this.mapSpacingToken(this.spacingBottom)??t,r=this.mapSpacingToken(this.spacingLeft),s=this.mapSpacingToken(this.spacingRight);e?this.style.setProperty("--scb-pagination-spacing-block-start",e):this.style.removeProperty("--scb-pagination-spacing-block-start"),i?this.style.setProperty("--scb-pagination-spacing-block-end",i):this.style.removeProperty("--scb-pagination-spacing-block-end"),r?this.style.setProperty("--scb-pagination-spacing-inline-start",r):this.style.removeProperty("--scb-pagination-spacing-inline-start"),s?this.style.setProperty("--scb-pagination-spacing-inline-end",s):this.style.removeProperty("--scb-pagination-spacing-inline-end")}firstUpdated(){this.__applySpacing()}updated(t){super.updated(t),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&this.__applySpacing()}render(){if(this.totalPages===0)return null;const t=this.variant?`${this.variant.toLowerCase()}`:"",e=[],{page:i,totalPages:r}=this,s=window.innerWidth<=768,o=s?1:2,n=l=>l===i?c`
9022
9022
  <li>
9023
9023
  <span
9024
9024
  class="page-number active"