scb-wc 0.1.151 → 0.1.152

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.
Files changed (49) hide show
  1. package/README.md +41 -22
  2. package/all.js +0 -5
  3. package/index.js +90 -95
  4. package/mvc/components/all.js +0 -5
  5. package/mvc/components/scb-accordion/scb-accordion-item.js +1 -1
  6. package/mvc/components/scb-button/scb-button.js +3 -3
  7. package/mvc/components/scb-calendar/scb-calendar.js +1 -1
  8. package/mvc/components/scb-calendar-card/scb-calendar-card.js +4 -4
  9. package/mvc/components/scb-card/scb-card.js +2 -2
  10. package/mvc/components/scb-dropdown/scb-dropdown.js +1 -1
  11. package/mvc/components/scb-header/scb-header.js +2 -2
  12. package/mvc/components/scb-horizontal-scroller/scb-horizontal-scroller.js +6 -6
  13. package/mvc/components/scb-icon-button/scb-icon-button.js +5 -5
  14. package/mvc/components/scb-keyfigure-card/scb-keyfigure-card.js +6 -6
  15. package/mvc/components/scb-list/scb-list-item.js +2 -2
  16. package/mvc/components/scb-menu/scb-menu-item.js +1 -1
  17. package/mvc/components/scb-nav/scb-nav.js +1 -1
  18. package/mvc/components/scb-options-menu/scb-options-menu-item.js +1 -1
  19. package/mvc/components/scb-progress-stepper/scb-progress-step.js +1 -1
  20. package/mvc/components/scb-search/scb-search.js +1 -1
  21. package/mvc/components/scb-segmented-button/scb-segmented-item.js +1 -1
  22. package/mvc/components/scb-select/scb-select-option.js +2 -2
  23. package/mvc/components/scb-select/scb-select.js +1 -1
  24. package/mvc/components/scb-stepper/scb-step.js +1 -1
  25. package/mvc/components/scb-textfield/scb-textfield.js +159 -28
  26. package/mvc/components/scb-toc/scb-toc-item.js +1 -1
  27. package/mvc/scb-logo.svg +20 -20
  28. package/mvc/scb.svg +13 -13
  29. package/mvc/vendor/lazy-focus-ring.js +2 -0
  30. package/mvc/vendor/lazy-ripple.js +2 -0
  31. package/mvc/{components/scb-chevron → vendor}/scb-chevron.js +1 -1
  32. package/mvc/vendor/scb-icon-svg.js +11 -0
  33. package/package.json +2 -2
  34. package/scb-chevron/scb-chevron.js +0 -1
  35. package/scb-datepicker/scb-datepicker.js +0 -1
  36. package/scb-wc-public-entry/index.d.ts +99 -0
  37. package/scb-wc.bundle.js +906 -906
  38. package/scb-wc.d.ts +198 -208
  39. package/shared/scb-icon-svg.js +2 -5
  40. package/mvc/components/scb-datepicker/scb-datepicker.js +0 -132
  41. package/mvc/components/shared/lazy-focus-ring.js +0 -2
  42. package/mvc/components/shared/lazy-ripple.js +0 -2
  43. package/mvc/components/shared/scb-icon-svg.js +0 -11
  44. package/scb-components/index.d.ts +0 -104
  45. package/scb-components/scb-chevron/scb-chevron.d.ts +0 -11
  46. package/scb-components/scb-datepicker/scb-datepicker.d.ts +0 -45
  47. package/scb-components/shared/lazy-focus-ring.d.ts +0 -4
  48. package/scb-components/shared/lazy-ripple.d.ts +0 -9
  49. package/scb-components/shared/scb-icon-svg.d.ts +0 -3
@@ -1,13 +1,144 @@
1
- import{f as $,h as k,m as z,p as n,v as c,y as S}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import"../../vendor/icon.js";import"../../vendor/ripple.js";import{ensureFocusRingReady as E}from"../shared/lazy-focus-ring.js";import{t as r}from"../../vendor/decorate.js";import{n as V,t as l}from"../../vendor/assertClassBrand.js";import"../scb-icon-button/scb-icon-button.js";import"../scb-datepicker/scb-datepicker.js";import"../scb-tooltip/scb-tooltip.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(i,o,d){try{customElements.get(i)||t(i,o,d)}catch(h){var p=String(h||"");if(p.indexOf("already been used")===-1&&p.indexOf("NotSupportedError")===-1)throw h}}}}catch{}})();var s,m,a=(s=new WeakSet,m=class extends k{constructor(){super(),V(this,s),this._internals=null,this._inputFocused=!1,this._kbShouldShowRing=!1,this._onGlobalKeydown=t=>{t.key==="Tab"&&(E(),this._kbShouldShowRing=!0,this._inputFocused&&l(s,this,v).call(this))},this._onGlobalPointerDown=()=>{this._kbShouldShowRing=!1,this._inputFocused&&l(s,this,v).call(this)},this._hasRenderedOnce=!1,this._boundField=null,this._onFieldInput=()=>{const t=this._boundField;if(!t)return;const i=t;if(this.value=i.value,this._internals){const o=this.disabled?null:this.value;this._internals.setFormValue(o)}l(s,this,b).call(this),this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("onValueChanged",{detail:{value:this.value},bubbles:!0,composed:!0}))},this._onFieldChange=()=>{this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))},this._onFieldSelect=()=>{this.dispatchEvent(new Event("select",{bubbles:!0,composed:!0}))},this._onFieldFocus=()=>{this._inputFocused=!0,l(s,this,v).call(this)},this._onFieldBlur=()=>{this._inputFocused=!1,l(s,this,v).call(this)},this.type="text",this.label="",this.supportingText="",this.helpText="",this.helpLabel="Visa hjälptext",this.clearLabel="Rensa fält",this.dateButtonLabel="Välj datum",this.errorText="",this.leadingIcon="",this.name="",this.pattern="",this.value="",this.underLabel="",this.error=!1,this.disabled=!1,this.required=!1,this.size="medium",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._form=null,this._formSubmitHandler=null,this._formResetHandler=null,this._initialValue="",this._customValidationMessage="",this._validationMessage="",this._hasValidationBeenReported=!1,this._inputId="",this._showDatepicker=!1,this._toggleDatepicker=()=>{this._showDatepicker=!this._showDatepicker},this._openDatepicker=()=>{this._showDatepicker=!0},this._onDatepickerClosed=()=>{this._showDatepicker=!1},this._onDateSelected=t=>{if(this.value=t.detail.value,this._showDatepicker=!1,this._internals){const i=this.disabled?null:this.value;this._internals.setFormValue(i)}l(s,this,b).call(this),this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("onValueChanged",{detail:{value:this.value},bubbles:!0,composed:!0}))},"attachInternals"in this&&(this._internals=this.attachInternals())}_syncDensityForSize(){this.size==="small"?this.setAttribute("data-density","-4"):this.size==="medium"?this.setAttribute("data-density","-2"):this.removeAttribute("data-density")}_renderLabel(){const t=!!this.underLabel,i=c`
1
+ import{f as v,h as F,m as T,p,v as l,y as L}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import"../../vendor/icon.js";import"../../vendor/ripple.js";import{r as P,t as I}from"../../vendor/lazy-focus-ring.js";import{t as r}from"../../vendor/decorate.js";import{n as B,t as b}from"../../vendor/assertClassBrand.js";import"../scb-button/scb-button.js";import"../scb-icon-button/scb-icon-button.js";import"../scb-divider/scb-divider.js";import"../scb-tooltip/scb-tooltip.js";(function(){try{var s=typeof globalThis<"u"?globalThis:window;if(!s.__scb_ce_guard_installed__){s.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(e,i,n){try{customElements.get(e)||t(e,i,n)}catch(c){var d=String(c||"");if(d.indexOf("already been used")===-1&&d.indexOf("NotSupportedError")===-1)throw c}}}}catch{}})();var $,g=($=class extends F{constructor(...t){super(...t),this._currentDate=new Date,this._selectedDate=null,this._showMonthDropdown=!1,this._showYearDropdown=!1,this.variant="date",this.lang="sv",this.selectedValue="",this.open=!0,this._selectedHour=0,this._selectedMinute=0,this._viewportMargin=8,this._popupOffset=4,this._onWindowReposition=()=>{this._positionPopupWithinViewport()},this._monthNames=[this.lang=="sv"?"Januari":"January",this.lang=="sv"?"Februari":"February",this.lang=="sv"?"Mars":"March",(this.lang=="sv","April"),this.lang=="sv"?"Maj":"May",this.lang=="sv"?"Juni":"June",this.lang=="sv"?"Juli":"July",this.lang=="sv"?"Augusti":"August",(this.lang=="sv","September"),this.lang=="sv"?"Oktober":"October",(this.lang=="sv","November"),(this.lang=="sv","December")],this._onPopupKeydown=e=>{e.key==="Escape"&&(e.preventDefault(),e.stopPropagation(),!this._closeOpenDropdowns()&&this._close())},this._outsideClickHandler=e=>{this.open&&(e.composedPath().includes(this)||this._close())},this._prevMonth=()=>{const e=this._currentDate.getFullYear(),i=this._currentDate.getMonth();i===0?this._currentDate=new Date(e-1,11,1):this._currentDate=new Date(e,i-1,1)},this._prevYear=()=>{const e=this._currentDate.getFullYear(),i=this._currentDate.getMonth();this._currentDate=new Date(e-1,i,1)},this._nextMonth=()=>{const e=this._currentDate.getFullYear(),i=this._currentDate.getMonth();i===11?this._currentDate=new Date(e+1,0,1):this._currentDate=new Date(e,i+1,1)},this._nextYear=()=>{const e=this._currentDate.getFullYear(),i=this._currentDate.getMonth();this._currentDate=new Date(e+1,i,1)},this._onTimeChange=e=>{const[i,n]=e.target.value.split(":"),d=parseInt(i,10),c=parseInt(n,10);this._selectedHour=isNaN(d)?0:Math.max(0,Math.min(23,d)),this._selectedMinute=isNaN(c)?0:Math.max(0,Math.min(59,c)),this._fireDateTimeChange()},this._close=()=>{this.open=!1,this.dispatchEvent(new CustomEvent("datepicker-closed",{bubbles:!0,composed:!0}))}}_isRenderedInsideDialog(){const t=this.getRootNode(),e=t instanceof ShadowRoot?t.host:null;return e instanceof HTMLElement&&e.closest("scb-dialog")?!0:!!this.closest("scb-dialog")}connectedCallback(){super.connectedCallback(),this._removeLazyFocusRingListeners=I(this,this.renderRoot)}_positionPopupWithinViewport(){if(!this.open)return;const t=this.renderRoot.querySelector(".datepicker-popup");if(!t)return;const e=this.parentElement?.getBoundingClientRect();if(!e)return;const i=window.innerWidth,n=window.innerHeight,d=Math.max(220,i-this._viewportMargin*2);if(this._isRenderedInsideDialog()){const D=Math.min(t.offsetWidth||380,d),M=t.offsetHeight||420,R=Math.min(Math.max(e.left,this._viewportMargin),i-this._viewportMargin-D),k=n-e.bottom-this._viewportMargin,z=e.top-this._viewportMargin,Y=k<M+this._popupOffset&&z>k;if(this.style.setProperty("--scb-datepicker-position","absolute"),this.style.setProperty("--scb-datepicker-computed-width",`${D}px`),this.style.setProperty("--scb-datepicker-left",`${R-e.left}px`),this.style.setProperty("--scb-datepicker-transform","none"),this.style.setProperty("--scb-datepicker-bottom","auto"),Y){const H=Math.max(this._viewportMargin,e.top-M-this._popupOffset)-e.top;this.style.setProperty("--scb-datepicker-top",`${H}px`),this.style.setProperty("--scb-datepicker-max-height",`${Math.max(0,z-this._popupOffset)}px`)}else this.style.setProperty("--scb-datepicker-top",`${e.height+this._popupOffset}px`),this.style.setProperty("--scb-datepicker-max-height",`${Math.max(0,k-this._popupOffset)}px`);return}const c=Math.min(t.offsetWidth||380,d),a=t.offsetHeight||420,o=Math.min(Math.max(e.left,this._viewportMargin),i-this._viewportMargin-c),f=n-e.bottom-this._viewportMargin,y=e.top-this._viewportMargin,V=f<a+this._popupOffset&&y>f;this.style.setProperty("--scb-datepicker-position","fixed"),this.style.setProperty("--scb-datepicker-computed-width",`${c}px`),this.style.setProperty("--scb-datepicker-left",`${o}px`),this.style.setProperty("--scb-datepicker-transform","none"),V?(this.style.setProperty("--scb-datepicker-top",`${Math.max(this._viewportMargin,e.top-a-this._popupOffset)}px`),this.style.setProperty("--scb-datepicker-bottom","auto"),this.style.setProperty("--scb-datepicker-max-height",`${Math.max(0,y-this._popupOffset)}px`)):(this.style.setProperty("--scb-datepicker-top",`${e.bottom+this._popupOffset}px`),this.style.setProperty("--scb-datepicker-bottom","auto"),this.style.setProperty("--scb-datepicker-max-height",`${Math.max(0,f-this._popupOffset)}px`))}updated(t){if(super.updated(t),this.open?(window.addEventListener("mousedown",this._outsideClickHandler),window.addEventListener("resize",this._onWindowReposition,{passive:!0}),window.addEventListener("scroll",this._onWindowReposition,{passive:!0,capture:!0}),requestAnimationFrame(()=>this._positionPopupWithinViewport())):(window.removeEventListener("mousedown",this._outsideClickHandler),window.removeEventListener("resize",this._onWindowReposition),window.removeEventListener("scroll",this._onWindowReposition,!0)),t.has("selectedValue")&&this.selectedValue){const e=new Date(this.selectedValue);isNaN(e.getTime())||(this._selectedDate=e,this._currentDate=new Date(e.getFullYear(),e.getMonth(),1),this.variant==="datetime-local"&&(this._selectedHour=e.getHours(),this._selectedMinute=e.getMinutes()))}this.open&&requestAnimationFrame(()=>this._positionPopupWithinViewport())}disconnectedCallback(){this._removeLazyFocusRingListeners?.(),this._removeLazyFocusRingListeners=void 0,window.removeEventListener("mousedown",this._outsideClickHandler),window.removeEventListener("resize",this._onWindowReposition),window.removeEventListener("scroll",this._onWindowReposition,!0),super.disconnectedCallback()}_locale(){return this.lang==="sv"?"sv-SE":"en-GB"}_formatDateLabel(t){return new Intl.DateTimeFormat(this._locale(),{day:"numeric",month:"long",year:"numeric"}).format(t)}_closeOpenDropdowns(){return!this._showMonthDropdown&&!this._showYearDropdown?!1:(this._showMonthDropdown=!1,this._showYearDropdown=!1,!0)}render(){if(!this.open)return l``;const t=this._currentDate.getFullYear(),e=this._currentDate.getMonth(),i=new Date,n=this._getMonthDays(t,e),d=Array.from({length:101},(a,o)=>i.getFullYear()-50+o),c=this.variant==="datetime-local"&&!this._showMonthDropdown&&!this._showYearDropdown;return l`
2
+ <div class="datepicker-popup popup" @keydown=${this._onPopupKeydown}>
3
+ <div class="header">
4
+ <div class="month-selector ${this._showMonthDropdown?"open":""} ${this._showYearDropdown?"disable":""}">
5
+ <scb-icon-button icon="chevron_left" @click=${this._prevMonth} aria-label=${this.lang=="sv"?"Föregående månad":"Previous month"}></scb-icon-button>
6
+ <div class="custom-dropdown month-dropdown">
7
+ <div
8
+ tabindex=${this._showYearDropdown?-1:0}
9
+ class="dropdown-selected"
10
+ role="button"
11
+ aria-haspopup="listbox"
12
+ aria-expanded=${String(this._showMonthDropdown)}
13
+ aria-label=${this.lang=="sv"?"Välj månad":"Choose month"}
14
+ @click=${()=>this._toggleMonthDropdown()}
15
+ @keydown=${a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),this._toggleMonthDropdown())}}
16
+ >
17
+ ${this._monthNames[e].slice(0,3)}
18
+ <md-icon aria-hidden="true">arrow_drop_down</md-icon>
19
+ <md-focus-ring></md-focus-ring>
20
+ <md-ripple></md-ripple>
21
+ </div>
22
+ </div>
23
+ <scb-icon-button icon="chevron_right" @click=${this._nextMonth} aria-label=${this.lang=="sv"?"Nästa månad":"Next month"}></scb-icon-button>
24
+ </div>
25
+ <div class="year-selector ${this._showMonthDropdown?"disable":""} ${this._showYearDropdown?"open":""}">
26
+ <scb-icon-button icon="chevron_left" @click=${this._prevYear} aria-label=${this.lang=="sv"?"Föregående år":"Previous year"}></scb-icon-button>
27
+ <div class="custom-dropdown year-dropdown">
28
+ <div
29
+ tabindex=${this._showMonthDropdown?-1:0}
30
+ class="dropdown-selected"
31
+ role="button"
32
+ aria-haspopup="listbox"
33
+ aria-expanded=${String(this._showYearDropdown)}
34
+ aria-label=${this.lang=="sv"?"Välj år":"Choose year"}
35
+ @click=${()=>this._toggleYearDropdown()}
36
+ @keydown=${a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),this._toggleYearDropdown())}}
37
+ >
38
+ ${t}
39
+ <md-icon aria-hidden="true">arrow_drop_down</md-icon>
40
+ <md-focus-ring></md-focus-ring>
41
+ <md-ripple></md-ripple>
42
+ </div>
43
+ </div>
44
+ <scb-icon-button icon="chevron_right" @click=${this._nextYear} aria-label=${this.lang=="sv"?"Nästa år":"Next year"}></scb-icon-button>
45
+ </div>
46
+ </div>
47
+ ${this._showMonthDropdown||this._showYearDropdown?l`<scb-divider></scb-divider>`:""}
48
+ <div class="datepicker-content" style="position:relative;">
49
+ ${this._showMonthDropdown?l`
50
+ <div class="dropdown-list" role="listbox" aria-label=${this.lang=="sv"?"Månader":"Months"}>
51
+ ${this._monthNames.map((a,o)=>l`
52
+ <div
53
+ @keydown=${f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),this._onMonthChangeCustom(o))}}
54
+ tabindex="0"
55
+ role="option"
56
+ aria-selected=${o===e?"true":"false"}
57
+ class="dropdown-item${o===e?" selected":""}"
58
+ @click=${()=>this._onMonthChangeCustom(o)}
59
+ id=${o===e?"selected-month":""}
60
+ >
61
+ ${o===e?l`<md-icon aria-hidden="true">check</md-icon>`:""}
62
+ ${a}
63
+ <md-ripple></md-ripple><md-focus-ring inward></md-focus-ring>
64
+ </div>
65
+ `)}
66
+ </div>
67
+ `:""}
68
+ ${this._showYearDropdown?l`
69
+ <div class="dropdown-list" role="listbox" aria-label=${this.lang=="sv"?"År":"Years"}>
70
+ ${d.map(a=>l`
71
+ <div
72
+ @keydown=${o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),this._onYearChangeCustom(a))}}
73
+ tabindex="0"
74
+ role="option"
75
+ aria-selected=${a===t?"true":"false"}
76
+ class="dropdown-item${a===t?" selected":""}"
77
+ @click=${()=>this._onYearChangeCustom(a)}
78
+ id=${a===t?"selected-year":""}
79
+ >
80
+ ${a===t?l`<md-icon aria-hidden="true">check</md-icon>`:""}
81
+ ${a}
82
+ <md-ripple></md-ripple><md-focus-ring inward></md-focus-ring>
83
+ </div>
84
+ `)}
85
+ </div>
86
+ `:""}
87
+ ${!this._showMonthDropdown&&!this._showYearDropdown?l`
88
+ <div class="datepicker-calendar">
89
+ <table>
90
+ <thead>
91
+ <tr>
92
+ <th>${this.lang=="sv"?"Må":"Mo"}</th><th>${this.lang=="sv"?"Ti":"Tu"}</th><th>${this.lang=="sv"?"On":"We"}</th><th>${this.lang=="sv"?"To":"Th"}</th><th>${this.lang=="sv","Fr"}</th><th>${this.lang=="sv"?"Lö":"Sa"}</th><th>${this.lang=="sv"?"Sö":"Su"}</th>
93
+ </tr>
94
+ </thead>
95
+ <tbody>
96
+ ${n.map(a=>l`
97
+ <tr>
98
+ ${a.map(o=>o?l`
99
+ <td>
100
+ <div
101
+ @keydown=${f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),this._selectDate(o))}}
102
+ role="button"
103
+ aria-label=${this._formatDateLabel(o)}
104
+ aria-pressed=${this._isSelected(o)?"true":"false"}
105
+ tabindex="0"
106
+ class="day${this._isToday(o,i)?" today":""}${this._isSelected(o)?" selected":""}"
107
+ @click=${()=>this._selectDate(o)}
108
+ >${o.getDate()}<md-ripple></md-ripple><md-focus-ring></md-focus-ring></div>
109
+ </td>
110
+ `:l`<td></td>`)}
111
+ </tr>
112
+ `)}
113
+ </tbody>
114
+ </table>
115
+ </div>
116
+ `:""}
117
+ </div>
118
+ ${c?l`
119
+ <div style="padding: 0 24px;">
120
+ <label style="display:flex;align-items:center;gap:8px;">
121
+ <span>${this.lang=="sv"?"Tid:":"Time:"}</span>
122
+ <scb-textfield type="time" .value=${`${String(this._selectedHour).padStart(2,"0")}:${String(this._selectedMinute).padStart(2,"0")}`} @blur=${this._onTimeChange} aria-label="${this.lang=="sv"?"Tid":"Time"}"></scb-textfield>
123
+ </label>
124
+ </div>
125
+ `:""}
126
+ <div class="datepicker-footer">
127
+ ${!this._showMonthDropdown&&!this._showYearDropdown?l`
128
+ <scb-button variant="text" label=${this.lang=="sv"?"Stäng":"Close"} @click=${this._close}></scb-button>
129
+ `:""}
130
+ </div>
131
+ </div>
132
+ `}_getMonthDays(t,e){const i=new Date(Date.UTC(t,e,1)),n=new Date(Date.UTC(t,e+1,0)),d=[];let c=[],a=i.getUTCDay(),o=a===0?6:a-1;for(let f=0;f<o;f++)c.push(null);for(let f=1;f<=n.getUTCDate();f++){const y=new Date(Date.UTC(t,e,f));c.push(y),c.length===7&&(d.push(c),c=[])}if(c.length){for(;c.length<7;)c.push(null);d.push(c)}return d}_toggleMonthDropdown(){this._showMonthDropdown=!this._showMonthDropdown,this._showMonthDropdown&&(this._showYearDropdown=!1,setTimeout(()=>{const t=this.renderRoot.querySelector("#selected-month");t&&t.scrollIntoView({block:"center"})},0))}_toggleYearDropdown(){this._showYearDropdown=!this._showYearDropdown,this._showYearDropdown&&(this._showMonthDropdown=!1,setTimeout(()=>{const t=this.renderRoot.querySelector("#selected-year");t&&t.scrollIntoView({block:"center"})},0))}_onMonthChangeCustom(t){const e=this._currentDate.getFullYear();this._currentDate=new Date(e,t,1),this._showMonthDropdown=!1}_onYearChangeCustom(t){const e=this._currentDate.getMonth();this._currentDate=new Date(t,e,1),this._showYearDropdown=!1}_isToday(t,e){return t.getDate()===e.getDate()&&t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear()}_isSelected(t){return this._selectedDate&&t.getDate()===this._selectedDate.getDate()&&t.getMonth()===this._selectedDate.getMonth()&&t.getFullYear()===this._selectedDate.getFullYear()}_selectDate(t){if(this._selectedDate=t,this.variant==="datetime-local"){const e=new Date(t);e.setHours(this._selectedHour??0,this._selectedMinute??0,0,0),this._selectedHour=e.getHours(),this._selectedMinute=e.getMinutes();const i=d=>d.toString().padStart(2,"0"),n=`${e.getFullYear()}-${i(e.getMonth()+1)}-${i(e.getDate())} ${i(e.getHours())}:${i(e.getMinutes())}`;this.dispatchEvent(new CustomEvent("date-selected",{detail:{value:n},bubbles:!0,composed:!0}))}else{const e=t.toISOString().slice(0,10);this.dispatchEvent(new CustomEvent("date-selected",{detail:{value:e},bubbles:!0,composed:!0}))}}_fireDateTimeChange(){if(this.variant==="datetime-local"&&this._selectedDate){const t=new Date(this._selectedDate);t.setHours(this._selectedHour??0,this._selectedMinute??0,0,0);const e=n=>n.toString().padStart(2,"0"),i=`${t.getFullYear()}-${e(t.getMonth()+1)}-${e(t.getDate())} ${e(t.getHours())}:${e(t.getMinutes())}`;this.dispatchEvent(new CustomEvent("date-selected",{detail:{value:i},bubbles:!0,composed:!0}))}}},$.styles=[L`:host{--scb-datepicker-width:380px;--scb-datepicker-z-index:1100;--scb-datepicker-viewport-margin:8px;--scb-datepicker-offset:var(--spacing-2, 4px);max-width:var(--scb-datepicker-computed-width, min(var(--scb-datepicker-width), calc(100vw - (var(--scb-datepicker-viewport-margin) * 2))));font-family:var(--brand-font);color:var(--md-sys-color-on-surface);display:block;position:var(--scb-datepicker-position, fixed);top:var(--scb-datepicker-top, calc(100% + var(--scb-datepicker-offset)));bottom:var(--scb-datepicker-bottom, auto);left:var(--scb-datepicker-left, 0);width:var(--scb-datepicker-computed-width, min(var(--scb-datepicker-width), calc(100vw - (var(--scb-datepicker-viewport-margin) * 2))));transform:var(--scb-datepicker-transform, translateX(0px));z-index:var(--scb-datepicker-z-index)}.dropdown-selected,.month-selector,.year-selector{display:flex;align-items:center}.dropdown-selected{position:relative;border-radius:8px;font-size:16px;cursor:pointer;text-align:left;gap:8px;padding:4px 8px}.dropdown-selected:focus{outline:0}.dropdown-selected md-focus-ring{border-radius:8px}.dropdown-list{position:relative;background:var(--md-sys-color-surface);padding:4px 0}.dropdown-item{display:flex;position:relative;cursor:pointer;padding:var(--spacing-3) 56px;min-height:40px;align-items:center}.dropdown-item:focus-within{outline:0}.datepicker-popup,.dropdown-item md-focus-ring{border-radius:var(--md-sys-shape-corner-small)}.dropdown-item.selected{background:var(--md-sys-color-secondary-container, #e3f2fd);font-weight:500;padding-left:16px;gap:16px}.datepicker-popup{background:var(--md-sys-color-surface);box-shadow:0 1px 2px 0 rgba(0,0,0,.3),0 2px 6px 2px rgba(0,0,0,.15);max-width:100%;width:100%;max-height:var(--scb-datepicker-max-height, 80vh);overflow:auto;font-family:var(--brand-font)}.datepicker-content{overflow-y:auto;max-height:290px}.datepicker-content::-webkit-scrollbar{width:12px;background:var(--md-sys-color-surface);border-radius:var(--md-sys-shape-corner-small)}.datepicker-content::-webkit-scrollbar-thumb{background:var(--md-sys-color-outline);border-radius:var(--md-sys-shape-corner-small);border:4px solid var(--md-sys-color-surface)}.datepicker-content::-webkit-scrollbar-track{background:var(--md-sys-color-surface);border-radius:var(--md-sys-shape-corner-small)}.popup{position:absolute;top:0;left:0;z-index:1}.header{display:flex;align-items:center;justify-content:space-between;margin-bottom:30px;padding:20px 16px 0;flex-wrap:wrap}.datepicker-footer{padding:8px 16px 24px}.month-label{font-size:18px;font-weight:500}.datepicker-calendar{padding:0 16px}table{width:100%;border-collapse:collapse;margin-bottom:8px}th{color:var(--md-sys-color-on-surface-variant, #757575);font-size:16px;font-weight:600;padding-bottom:20px}td{text-align:center}.day:focus-within{outline:0}.close-datepicker,.day{background:0 0;font-size:16px;cursor:pointer}.day{position:relative;width:40px;height:40px;border-radius:50%;border:0;font-family:var(--brand-font, Inter, Arial, sans-serif);align-content:center}.day.selected{background:var(--md-sys-color-secondary-container)}.close-datepicker{margin-top:8px;border-color:none;color:var(--md-sys-color-primary, #0057b8);padding:4px 12px;border-radius:8px}.close-datepicker:hover{background:var(--md-sys-color-primary-container, #e3f2fd)}`],$);r([v()],g.prototype,"_currentDate",void 0);r([v()],g.prototype,"_selectedDate",void 0);r([v()],g.prototype,"_showMonthDropdown",void 0);r([v()],g.prototype,"_showYearDropdown",void 0);r([p({type:String})],g.prototype,"variant",void 0);r([p({type:String})],g.prototype,"lang",void 0);r([p({type:String})],g.prototype,"selectedValue",void 0);r([p({type:Boolean})],g.prototype,"open",void 0);r([v()],g.prototype,"_selectedHour",void 0);r([v()],g.prototype,"_selectedMinute",void 0);g=r([T("scb-datepicker")],g);var h,w,u=(h=new WeakSet,w=class extends F{constructor(){super(),B(this,h),this._internals=null,this._inputFocused=!1,this._kbShouldShowRing=!1,this._onGlobalKeydown=t=>{t.key==="Tab"&&(P(),this._kbShouldShowRing=!0,this._inputFocused&&b(h,this,_).call(this))},this._onGlobalPointerDown=()=>{this._kbShouldShowRing=!1,this._inputFocused&&b(h,this,_).call(this)},this._hasRenderedOnce=!1,this._boundField=null,this._onFieldInput=()=>{const t=this._boundField;if(!t)return;const e=t;if(this.value=e.value,this._internals){const i=this.disabled?null:this.value;this._internals.setFormValue(i)}b(h,this,m).call(this),this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("onValueChanged",{detail:{value:this.value},bubbles:!0,composed:!0}))},this._onFieldChange=()=>{this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))},this._onFieldSelect=()=>{this.dispatchEvent(new Event("select",{bubbles:!0,composed:!0}))},this._onFieldFocus=()=>{this._inputFocused=!0,b(h,this,_).call(this)},this._onFieldBlur=()=>{this._inputFocused=!1,b(h,this,_).call(this)},this.type="text",this.label="",this.supportingText="",this.helpText="",this.helpLabel="Visa hjälptext",this.clearLabel="Rensa fält",this.dateButtonLabel="Välj datum",this.errorText="",this.leadingIcon="",this.name="",this.pattern="",this.value="",this.underLabel="",this.error=!1,this.disabled=!1,this.required=!1,this.size="medium",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._form=null,this._formSubmitHandler=null,this._formResetHandler=null,this._initialValue="",this._customValidationMessage="",this._validationMessage="",this._hasValidationBeenReported=!1,this._inputId="",this._showDatepicker=!1,this._toggleDatepicker=()=>{this._showDatepicker=!this._showDatepicker},this._openDatepicker=()=>{this._showDatepicker=!0},this._onDatepickerClosed=()=>{this._showDatepicker=!1},this._onDateSelected=t=>{if(this.value=t.detail.value,this._showDatepicker=!1,this._internals){const e=this.disabled?null:this.value;this._internals.setFormValue(e)}b(h,this,m).call(this),this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("onValueChanged",{detail:{value:this.value},bubbles:!0,composed:!0}))},"attachInternals"in this&&(this._internals=this.attachInternals())}_syncDensityForSize(){this.size==="small"?this.setAttribute("data-density","-4"):this.size==="medium"?this.setAttribute("data-density","-2"):this.removeAttribute("data-density")}_renderLabel(){const t=!!this.underLabel,e=l`
2
133
  <label
3
134
  class="scb-textfield-label ${!t&&!this.helpText?"scb-textfield-label--without-supporting":""}"
4
135
  for="${this._inputId}"
5
136
  >
6
137
  ${this.label}
7
138
  </label>
8
- `;return this.helpText?c`
139
+ `;return this.helpText?l`
9
140
  <div class="scb-textfield-label-row ${t?"":"scb-textfield-label-row--without-supporting"}">
10
- ${i}
141
+ ${e}
11
142
  <scb-tooltip
12
143
  class="scb-textfield-help-tooltip"
13
144
  supporting-text=${this.helpText}
@@ -23,11 +154,11 @@ import{f as $,h as k,m as z,p as n,v as c,y as S}from"../../vendor/vendor.js";im
23
154
  ></scb-icon-button>
24
155
  </scb-tooltip>
25
156
  </div>
26
- `:i}_renderSupportingText(){return this.underLabel?c`
157
+ `:e}_renderSupportingText(){return this.underLabel?l`
27
158
  <span class="scb-textfield-supporting-text" id="${this._inputId}-supporting-text">
28
159
  ${this.underLabel}
29
160
  </span>
30
- `:null}render(){const t=this.leadingIcon?c`<md-icon class="scb-textfield-icon">${this.leadingIcon}</md-icon>`:null,i=this.error?c`<md-icon class="scb-textfield-error-icon" aria-hidden="true">error</md-icon>`:null;this.underLabel=this.error?this._validationMessage||this.errorText||"Ogiltig inmatning.":this.supportingText,this.value=this.value||"";const o=this.underLabel?`${this._inputId}-supporting-text`:void 0,d=this._renderLabel(),p=this._renderSupportingText(),h=this.type==="search"&&this.value?c`
161
+ `:null}render(){const t=this.leadingIcon?l`<md-icon class="scb-textfield-icon">${this.leadingIcon}</md-icon>`:null,e=this.error?l`<md-icon class="scb-textfield-error-icon" aria-hidden="true">error</md-icon>`:null;this.underLabel=this.error?this._validationMessage||this.errorText||"Ogiltig inmatning.":this.supportingText,this.value=this.value||"";const i=this.underLabel?`${this._inputId}-supporting-text`:void 0,n=this._renderLabel(),d=this._renderSupportingText(),c=this.type==="search"&&this.value?l`
31
162
  <button
32
163
  type="button"
33
164
  class="scb-textfield-clear"
@@ -61,9 +192,9 @@ import{f as $,h as k,m as z,p as n,v as c,y as S}from"../../vendor/vendor.js";im
61
192
  ></line>
62
193
  </svg>
63
194
  </button>
64
- `:null;return this.type==="textarea"?c`
195
+ `:null;return this.type==="textarea"?l`
196
+ ${n}
65
197
  ${d}
66
- ${p}
67
198
  <div class="scb-textfield-wrapper">
68
199
  <div class="ripple-wrapper">
69
200
  <textarea
@@ -74,15 +205,15 @@ import{f as $,h as k,m as z,p as n,v as c,y as S}from"../../vendor/vendor.js";im
74
205
  id="${this._inputId}"
75
206
  ?required=${this.required}
76
207
  aria-invalid=${this.error?"true":"false"}
77
- aria-describedby=${o}
208
+ aria-describedby=${i}
78
209
  ></textarea>
79
210
  <md-ripple></md-ripple>
80
211
  <md-focus-ring class="input-ring"></md-focus-ring>
81
212
  </div>
82
213
  </div>
83
- `:this.type==="date"?c`
214
+ `:this.type==="date"?l`
215
+ ${n}
84
216
  ${d}
85
- ${p}
86
217
  <div class="scb-textfield-wrapper">
87
218
  ${t}
88
219
  <div class="ripple-wrapper">
@@ -95,7 +226,7 @@ import{f as $,h as k,m as z,p as n,v as c,y as S}from"../../vendor/vendor.js";im
95
226
  ?disabled=${this.disabled}
96
227
  ?required=${this.required}
97
228
  aria-invalid=${this.error?"true":"false"}
98
- aria-describedby=${o}
229
+ aria-describedby=${i}
99
230
  readonly
100
231
  @focus=${this._openDatepicker}
101
232
  @click=${this._openDatepicker}
@@ -103,7 +234,7 @@ import{f as $,h as k,m as z,p as n,v as c,y as S}from"../../vendor/vendor.js";im
103
234
  <md-ripple></md-ripple>
104
235
  <md-focus-ring class="input-ring"></md-focus-ring>
105
236
  </div>
106
- ${this.error?i:c`
237
+ ${this.error?e:l`
107
238
  <scb-icon-button
108
239
  class="scb-textfield-datepicker-button"
109
240
  icon="calendar_today"
@@ -119,9 +250,9 @@ import{f as $,h as k,m as z,p as n,v as c,y as S}from"../../vendor/vendor.js";im
119
250
  @datepicker-closed=${this._onDatepickerClosed}
120
251
  ></scb-datepicker>
121
252
  </div>
122
- `:this.type==="datetime-local"?c`
253
+ `:this.type==="datetime-local"?l`
254
+ ${n}
123
255
  ${d}
124
- ${p}
125
256
  <div class="scb-textfield-wrapper" style="position:relative;">
126
257
  ${t}
127
258
  <div class="ripple-wrapper">
@@ -134,7 +265,7 @@ import{f as $,h as k,m as z,p as n,v as c,y as S}from"../../vendor/vendor.js";im
134
265
  ?disabled=${this.disabled}
135
266
  ?required=${this.required}
136
267
  aria-invalid=${this.error?"true":"false"}
137
- aria-describedby=${o}
268
+ aria-describedby=${i}
138
269
  readonly
139
270
  @focus=${this._openDatepicker}
140
271
  @click=${this._openDatepicker}
@@ -144,7 +275,7 @@ import{f as $,h as k,m as z,p as n,v as c,y as S}from"../../vendor/vendor.js";im
144
275
  <md-focus-ring class="input-ring"></md-focus-ring>
145
276
  </div>
146
277
 
147
- ${this.error?i:c`
278
+ ${this.error?e:l`
148
279
  <scb-icon-button
149
280
  class="scb-textfield-datepicker-button"
150
281
  icon="calendar_today"
@@ -161,9 +292,9 @@ import{f as $,h as k,m as z,p as n,v as c,y as S}from"../../vendor/vendor.js";im
161
292
  @datepicker-closed=${this._onDatepickerClosed}
162
293
  ></scb-datepicker>
163
294
  </div>
164
- `:this.type==="time"?c`
295
+ `:this.type==="time"?l`
296
+ ${n}
165
297
  ${d}
166
- ${p}
167
298
  <div class="scb-textfield-wrapper">
168
299
  ${t}
169
300
  <div class="ripple-wrapper">
@@ -176,17 +307,17 @@ import{f as $,h as k,m as z,p as n,v as c,y as S}from"../../vendor/vendor.js";im
176
307
  ?disabled=${this.disabled}
177
308
  ?required=${this.required}
178
309
  aria-invalid=${this.error?"true":"false"}
179
- aria-describedby=${o}
180
- @input=${u=>{const g=u.target;if(this.value=g.value,this._internals){const w=this.disabled?null:this.value;this._internals.setFormValue(w)}l(s,this,b).call(this),this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("onValueChanged",{detail:{value:this.value},bubbles:!0,composed:!0}))}}
310
+ aria-describedby=${i}
311
+ @input=${a=>{const o=a.target;if(this.value=o.value,this._internals){const f=this.disabled?null:this.value;this._internals.setFormValue(f)}b(h,this,m).call(this),this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("onValueChanged",{detail:{value:this.value},bubbles:!0,composed:!0}))}}
181
312
  />
182
- ${i}
313
+ ${e}
183
314
  <md-ripple></md-ripple>
184
315
  <md-focus-ring class="input-ring"></md-focus-ring>
185
316
  </div>
186
317
  </div>
187
- `:c`
318
+ `:l`
319
+ ${n}
188
320
  ${d}
189
- ${p}
190
321
  <div class="scb-textfield-wrapper">
191
322
  ${t}
192
323
  <div class="ripple-wrapper">
@@ -199,15 +330,15 @@ import{f as $,h as k,m as z,p as n,v as c,y as S}from"../../vendor/vendor.js";im
199
330
  ?disabled=${this.disabled}
200
331
  ?required=${this.required}
201
332
  aria-invalid=${this.error?"true":"false"}
202
- aria-describedby=${o}
333
+ aria-describedby=${i}
203
334
  />
204
- ${h}
205
- ${i}
335
+ ${c}
336
+ ${e}
206
337
  <md-ripple></md-ripple>
207
338
  <md-focus-ring class="input-ring"></md-focus-ring>
208
339
  </div>
209
340
  </div>
210
- `}firstUpdated(t){super.firstUpdated(t),this._initialValue=this.value,this._internals&&this.value&&this._internals.setFormValue(this.value),l(s,this,y).call(this),l(s,this,x).call(this)}updated(t){if(super.updated(t),this.toggleAttribute("aria-disabled",this.disabled),t.has("size")&&this._syncDensityForSize(),this._internals&&(t.has("value")||t.has("disabled"))){const i=this.disabled?null:this.value;this._internals.setFormValue(i)}t.has("type")&&(l(s,this,y).call(this),this._hasRenderedOnce&&l(s,this,L).call(this)),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&l(s,this,x).call(this),this._hasRenderedOnce=!0}formDisabledCallback(t){this.disabled=t,t&&(this._hasValidationBeenReported=!1)}connectedCallback(){super.connectedCallback(),this._syncDensityForSize(),this._inputId=this.id||`scb-textfield-${Math.random().toString(36).substr(2,9)}`,this._formSubmitHandler=t=>{this.reportValidity()||(t.preventDefault(),t.stopPropagation())},this._form=this.closest("form"),this._form&&(this._form.addEventListener("submit",this._formSubmitHandler,!0),this._formResetHandler=()=>{this.value=this._initialValue;const t=this.shadowRoot?.querySelector(".scb-textfield");t&&(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&(t.value=this._initialValue),this.error=!1,this._hasValidationBeenReported=!1,l(s,this,b).call(this,!1)},this._form.addEventListener("reset",this._formResetHandler,!0)),window.addEventListener("keydown",this._onGlobalKeydown,!0),window.addEventListener("pointerdown",this._onGlobalPointerDown,!0)}disconnectedCallback(){super.disconnectedCallback(),this._form&&this._formSubmitHandler&&(this._form.removeEventListener("submit",this._formSubmitHandler,!0),this._formResetHandler&&this._form.removeEventListener("reset",this._formResetHandler,!0)),l(s,this,_).call(this),window.removeEventListener("keydown",this._onGlobalKeydown,!0),window.removeEventListener("pointerdown",this._onGlobalPointerDown,!0)}reportValidity(){return this._hasValidationBeenReported=!0,l(s,this,b).call(this,!0)}checkValidity(){return l(s,this,b).call(this,!1)}setCustomValidity(t){this._customValidationMessage=String(t??""),l(s,this,b).call(this,!1)}get form(){return this._internals?.form??this._form}get validity(){return this._internals?.validity??this._boundField?.validity}get validationMessage(){return this._internals?.validationMessage||this._validationMessage||this._boundField?.validationMessage||""}get willValidate(){return this._internals?.willValidate??!this.disabled}get labels(){return this._internals?.labels}_onClearClick(){const t=this.shadowRoot?.querySelector(".scb-textfield");if(t&&(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)){if(t.value="",this.value="",this._internals){const i=this.disabled?null:this.value;this._internals.setFormValue(i),this._internals.setValidity({})}this.error=!1,t.setCustomValidity(""),this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("onValueChanged",{detail:{value:this.value},bubbles:!0,composed:!0})),t.focus()}}},m.formAssociated=!0,m.styles=[S`:host,:host([size='large']){--scb-textfield-trailing-gap:var(--spacing-3)}:host{--scb-textfield-number-max-width:280px;--scb-textfield-text-max-width:400px;--scb-textfield-search-max-width:600px;--scb-textfield-email-max-width:400px;--scb-textfield-password-max-width:400px;--scb-textfield-tel-max-width:400px;--scb-textfield-url-max-width:400px;--scb-textfield-textarea-max-width:600px;font-family:var(--brand-font);color:var(--md-sys-color-on-surface);margin-block-start:var(--scb-textfield-spacing-block-start, 0);margin-block-end:var(--scb-textfield-spacing-block-end, 0);margin-inline-start:var(--scb-textfield-spacing-inline-start, 0);margin-inline-end:var(--scb-textfield-spacing-inline-end, 0);-webkit-tap-highlight-color:transparent;--scb-textfield-padding-x:var(--spacing-4);--scb-textfield-padding-y:calc(var(--spacing-3) - var(--spacing-1));--scb-textfield-min-height:var(--scb-control-size-medium, var(--scale-10, 40px));--scb-textfield-font-family:var(--scb-form-control-text-font, var(--scb-typography-body-large-font, var(--md-sys-typescale-body-large-font)));--scb-textfield-font-size:var(--scb-form-control-text-size, var(--scb-typography-body-large-size, var(--md-sys-typescale-body-large-size)));--scb-textfield-line-height:var(--scb-form-control-text-line-height, var(--scb-typography-body-large-line-height, var(--md-sys-typescale-body-large-line-height)));--scb-textfield-letter-spacing:var(--scb-form-control-text-letter-spacing, var(--scb-typography-body-large-tracking, var(--md-sys-typescale-body-large-tracking)));--scb-textfield-font-weight:var(--scb-form-control-text-font-weight, var(--scb-typography-body-large-weight, var(--md-sys-typescale-body-large-weight)));--scb-textfield-label-font-family:var(--scb-form-control-label-font, var(--scb-typography-label-medium-font, var(--md-sys-typescale-label-medium-font)));--scb-textfield-label-font-size:var(--scb-form-control-label-size, var(--scb-typography-label-medium-size, var(--md-sys-typescale-label-medium-size)));--scb-textfield-label-line-height:var(--scb-form-control-label-line-height, var(--scb-typography-label-medium-line-height, var(--md-sys-typescale-label-medium-line-height)));--scb-textfield-label-letter-spacing:var(--scb-form-control-label-letter-spacing, var(--scb-typography-label-medium-tracking, var(--md-sys-typescale-label-medium-tracking)));--scb-textfield-label-font-weight:var(--scb-form-control-label-font-weight, var(--scb-typography-label-medium-weight, var(--md-sys-typescale-label-medium-weight, var(--weight-semibold))));--scb-textfield-supporting-font-family:var(--scb-form-control-supporting-font, var(--scb-typography-body-medium-font, var(--md-sys-typescale-body-medium-font)));--scb-textfield-supporting-font-size:var(--scb-form-control-supporting-size, var(--scb-typography-body-medium-size, var(--md-sys-typescale-body-medium-size)));--scb-textfield-supporting-line-height:var(--scb-form-control-supporting-line-height, var(--scb-typography-body-medium-line-height, var(--md-sys-typescale-body-medium-line-height)));--scb-textfield-supporting-letter-spacing:var(--scb-form-control-supporting-letter-spacing, var(--scb-typography-body-medium-tracking, var(--md-sys-typescale-body-medium-tracking)));--scb-textfield-supporting-font-weight:var(--scb-form-control-supporting-font-weight, var(--scb-typography-body-medium-weight, var(--md-sys-typescale-body-medium-weight, var(--weight-regular))));--scb-textfield-label-gap:var(--spacing-3);--scb-textfield-leading-inset:var(--spacing-3);--scb-textfield-leading-icon-size:var(--icon-size-small, 20px);--scb-textfield-leading-gap:var(--spacing-5);--scb-textfield-leading-padding:calc(
341
+ `}firstUpdated(t){super.firstUpdated(t),this._initialValue=this.value,this._internals&&this.value&&this._internals.setFormValue(this.value),b(h,this,E).call(this),b(h,this,S).call(this)}updated(t){if(super.updated(t),this.toggleAttribute("aria-disabled",this.disabled),t.has("size")&&this._syncDensityForSize(),this._internals&&(t.has("value")||t.has("disabled"))){const e=this.disabled?null:this.value;this._internals.setFormValue(e)}t.has("type")&&(b(h,this,E).call(this),this._hasRenderedOnce&&b(h,this,O).call(this)),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&b(h,this,S).call(this),this._hasRenderedOnce=!0}formDisabledCallback(t){this.disabled=t,t&&(this._hasValidationBeenReported=!1)}connectedCallback(){super.connectedCallback(),this._syncDensityForSize(),this._inputId=this.id||`scb-textfield-${Math.random().toString(36).substr(2,9)}`,this._formSubmitHandler=t=>{this.reportValidity()||(t.preventDefault(),t.stopPropagation())},this._form=this.closest("form"),this._form&&(this._form.addEventListener("submit",this._formSubmitHandler,!0),this._formResetHandler=()=>{this.value=this._initialValue;const t=this.shadowRoot?.querySelector(".scb-textfield");t&&(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&(t.value=this._initialValue),this.error=!1,this._hasValidationBeenReported=!1,b(h,this,m).call(this,!1)},this._form.addEventListener("reset",this._formResetHandler,!0)),window.addEventListener("keydown",this._onGlobalKeydown,!0),window.addEventListener("pointerdown",this._onGlobalPointerDown,!0)}disconnectedCallback(){super.disconnectedCallback(),this._form&&this._formSubmitHandler&&(this._form.removeEventListener("submit",this._formSubmitHandler,!0),this._formResetHandler&&this._form.removeEventListener("reset",this._formResetHandler,!0)),b(h,this,C).call(this),window.removeEventListener("keydown",this._onGlobalKeydown,!0),window.removeEventListener("pointerdown",this._onGlobalPointerDown,!0)}reportValidity(){return this._hasValidationBeenReported=!0,b(h,this,m).call(this,!0)}checkValidity(){return b(h,this,m).call(this,!1)}setCustomValidity(t){this._customValidationMessage=String(t??""),b(h,this,m).call(this,!1)}get form(){return this._internals?.form??this._form}get validity(){return this._internals?.validity??this._boundField?.validity}get validationMessage(){return this._internals?.validationMessage||this._validationMessage||this._boundField?.validationMessage||""}get willValidate(){return this._internals?.willValidate??!this.disabled}get labels(){return this._internals?.labels}_onClearClick(){const t=this.shadowRoot?.querySelector(".scb-textfield");if(t&&(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)){if(t.value="",this.value="",this._internals){const e=this.disabled?null:this.value;this._internals.setFormValue(e),this._internals.setValidity({})}this.error=!1,t.setCustomValidity(""),this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("onValueChanged",{detail:{value:this.value},bubbles:!0,composed:!0})),t.focus()}}},w.formAssociated=!0,w.styles=[L`:host,:host([size='large']){--scb-textfield-trailing-gap:var(--spacing-3)}:host{--scb-textfield-number-max-width:280px;--scb-textfield-text-max-width:400px;--scb-textfield-search-max-width:600px;--scb-textfield-email-max-width:400px;--scb-textfield-password-max-width:400px;--scb-textfield-tel-max-width:400px;--scb-textfield-url-max-width:400px;--scb-textfield-textarea-max-width:600px;font-family:var(--brand-font);color:var(--md-sys-color-on-surface);margin-block-start:var(--scb-textfield-spacing-block-start, 0);margin-block-end:var(--scb-textfield-spacing-block-end, 0);margin-inline-start:var(--scb-textfield-spacing-inline-start, 0);margin-inline-end:var(--scb-textfield-spacing-inline-end, 0);-webkit-tap-highlight-color:transparent;--scb-textfield-padding-x:var(--spacing-4);--scb-textfield-padding-y:calc(var(--spacing-3) - var(--spacing-1));--scb-textfield-min-height:var(--scb-control-size-medium, var(--scale-10, 40px));--scb-textfield-font-family:var(--scb-form-control-text-font, var(--scb-typography-body-large-font, var(--md-sys-typescale-body-large-font)));--scb-textfield-font-size:var(--scb-form-control-text-size, var(--scb-typography-body-large-size, var(--md-sys-typescale-body-large-size)));--scb-textfield-line-height:var(--scb-form-control-text-line-height, var(--scb-typography-body-large-line-height, var(--md-sys-typescale-body-large-line-height)));--scb-textfield-letter-spacing:var(--scb-form-control-text-letter-spacing, var(--scb-typography-body-large-tracking, var(--md-sys-typescale-body-large-tracking)));--scb-textfield-font-weight:var(--scb-form-control-text-font-weight, var(--scb-typography-body-large-weight, var(--md-sys-typescale-body-large-weight)));--scb-textfield-label-font-family:var(--scb-form-control-label-font, var(--scb-typography-label-medium-font, var(--md-sys-typescale-label-medium-font)));--scb-textfield-label-font-size:var(--scb-form-control-label-size, var(--scb-typography-label-medium-size, var(--md-sys-typescale-label-medium-size)));--scb-textfield-label-line-height:var(--scb-form-control-label-line-height, var(--scb-typography-label-medium-line-height, var(--md-sys-typescale-label-medium-line-height)));--scb-textfield-label-letter-spacing:var(--scb-form-control-label-letter-spacing, var(--scb-typography-label-medium-tracking, var(--md-sys-typescale-label-medium-tracking)));--scb-textfield-label-font-weight:var(--scb-form-control-label-font-weight, var(--scb-typography-label-medium-weight, var(--md-sys-typescale-label-medium-weight, var(--weight-semibold))));--scb-textfield-supporting-font-family:var(--scb-form-control-supporting-font, var(--scb-typography-body-medium-font, var(--md-sys-typescale-body-medium-font)));--scb-textfield-supporting-font-size:var(--scb-form-control-supporting-size, var(--scb-typography-body-medium-size, var(--md-sys-typescale-body-medium-size)));--scb-textfield-supporting-line-height:var(--scb-form-control-supporting-line-height, var(--scb-typography-body-medium-line-height, var(--md-sys-typescale-body-medium-line-height)));--scb-textfield-supporting-letter-spacing:var(--scb-form-control-supporting-letter-spacing, var(--scb-typography-body-medium-tracking, var(--md-sys-typescale-body-medium-tracking)));--scb-textfield-supporting-font-weight:var(--scb-form-control-supporting-font-weight, var(--scb-typography-body-medium-weight, var(--md-sys-typescale-body-medium-weight, var(--weight-regular))));--scb-textfield-label-gap:var(--spacing-3);--scb-textfield-leading-inset:var(--spacing-3);--scb-textfield-leading-icon-size:var(--icon-size-small, 20px);--scb-textfield-leading-gap:var(--spacing-5);--scb-textfield-leading-padding:calc(
211
342
  var(--scb-textfield-leading-inset) +
212
343
  var(--scb-textfield-leading-icon-size) +
213
344
  var(--scb-textfield-leading-gap)
@@ -215,4 +346,4 @@ import{f as $,h as k,m as z,p as n,v as c,y as S}from"../../vendor/vendor.js";im
215
346
  var(--scb-textfield-trailing-inset) +
216
347
  var(--scb-textfield-trailing-action-size) +
217
348
  var(--spacing-2)
218
- )}:host([size='large']){--scb-textfield-padding-x:var(--spacing-5);--scb-textfield-padding-y:calc(var(--spacing-5) - var(--spacing-1));--scb-textfield-min-height:var(--scb-control-size-large, var(--scale-12, 56px));--scb-textfield-leading-inset:var(--spacing-4);--scb-textfield-leading-icon-size:var(--icon-size-medium, 24px);--scb-textfield-leading-gap:var(--spacing-4);--scb-textfield-trailing-inset:var(--spacing-4);--scb-textfield-trailing-icon-size:var(--icon-size-medium, 24px);--scb-textfield-trailing-action-size:var(--scb-control-size-large, var(--scale-12, 56px))}:host([size='medium']),:host([size='small']){--scb-textfield-padding-x:var(--spacing-4);--scb-textfield-leading-inset:var(--spacing-3);--scb-textfield-leading-icon-size:var(--icon-size-small, 20px);--scb-textfield-leading-gap:var(--spacing-5);--scb-textfield-trailing-inset:var(--spacing-3);--scb-textfield-trailing-icon-size:var(--icon-size-small, 20px);--scb-textfield-trailing-gap:var(--spacing-3)}:host([size='medium']){--scb-textfield-padding-y:calc(var(--spacing-3) - var(--spacing-1));--scb-textfield-min-height:var(--scb-control-size-medium, var(--scale-10, 40px));--scb-textfield-trailing-action-size:var(--scb-control-size-medium, var(--scale-10, 40px))}:host([size='small']){--scb-textfield-padding-y:var(--spacing-1);--scb-textfield-min-height:var(--scb-control-size-small, var(--scale-08, 32px));--scb-textfield-trailing-action-size:var(--scb-control-size-small, var(--scale-08, 32px))}:host([type='number']){--scb-textfield-max-width:var(--scb-textfield-number-max-width)}:host([type='datetime-local']),:host([type='text']){--scb-textfield-max-width:var(--scb-textfield-text-max-width)}:host([type='search']){--scb-textfield-max-width:var(--scb-textfield-search-max-width)}:host([type='email']){--scb-textfield-max-width:var(--scb-textfield-email-max-width)}:host([type='password']){--scb-textfield-max-width:var(--scb-textfield-password-max-width)}:host([type='tel']){--scb-textfield-max-width:var(--scb-textfield-tel-max-width)}:host([type='url']){--scb-textfield-max-width:var(--scb-textfield-url-max-width)}:host([type='textarea']){--scb-textfield-max-width:var(--scb-textfield-textarea-max-width)}:host([type='date']),:host([type='time']){--scb-textfield-max-width:var(--scb-textfield-text-max-width)}input[type=time]::-webkit-calendar-picker-indicator{display:none;background:0 0}:host{display:flex;flex-direction:column;max-width:var(--scb-textfield-max-width)}:host([error]) .scb-textfield-supporting-text{color:var(--md-sys-color-error)}:host([error]) .scb-textfield{border-color:var(--md-sys-color-error)}:host([error]) .scb-textfield:focus-visible{border-color:var(--md-sys-color-error);box-shadow:inset 0 0 0 2px var(--md-sys-color-error)}:host([disabled]){opacity:.38;cursor:default}.scb-textfield-label{display:block;font-family:var(--scb-textfield-label-font-family);font-size:var(--scb-textfield-label-font-size);font-weight:var(--scb-textfield-label-font-weight);line-height:var(--scb-textfield-label-line-height);letter-spacing:var(--scb-textfield-label-letter-spacing)}.scb-textfield-label-row{display:flex;align-items:center;gap:var(--spacing-1, 2px)}.scb-textfield-label-row--without-supporting{margin-bottom:var(--scb-textfield-label-gap)}.scb-textfield-help-tooltip{display:inline-flex;align-items:center;flex:0 0 auto;line-height:0}.scb-textfield-help-button{--scb-icon-button-container-size:var(--scb-control-size-tiny, var(--scale-06, 24px));--scb-icon-button-icon-size:var(--icon-size-extra-small, 16px)}.scb-textfield-label--without-supporting,.scb-textfield-supporting-text{margin-bottom:var(--scb-textfield-label-gap)}.scb-textfield-supporting-text{display:block;font-family:var(--scb-textfield-supporting-font-family);font-size:var(--scb-textfield-supporting-font-size);line-height:var(--scb-textfield-supporting-line-height);font-weight:var(--scb-textfield-supporting-font-weight);letter-spacing:var(--scb-textfield-supporting-letter-spacing);color:var(--md-sys-color-on-surface-variant)}.scb-textfield{padding:var(--scb-textfield-padding-y) var(--scb-textfield-padding-x);block-size:var(--scb-textfield-min-height);min-height:var(--scb-textfield-min-height);border:1px solid var(--md-sys-color-outline);border-radius:var(--md-sys-shape-corner-small);font-size:var(--scb-textfield-font-size);font-family:var(--scb-textfield-font-family);line-height:var(--scb-textfield-line-height);font-weight:var(--scb-textfield-font-weight);letter-spacing:var(--scb-textfield-letter-spacing);width:100%;box-sizing:border-box;background-color:transparent;color:var(--md-sys-color-on-surface);position:relative;z-index:1}:host([type='date']) .scb-textfield,:host([type='search']) .scb-textfield{padding-right:var(--scb-textfield-trailing-reserved)}md-icon+.ripple-wrapper>.scb-textfield{padding-left:var(--scb-textfield-leading-padding)}.scb-textfield-icon{position:absolute;left:var(--scb-textfield-leading-inset);top:50%;transform:translateY(-50%);pointer-events:none;font-size:var(--scb-textfield-leading-icon-size);z-index:2}.scb-textfield:focus-visible{outline:0;box-shadow:inset 0 0 0 2px var(--md-sys-color-primary);border:1px solid var(--md-sys-color-primary)}.ripple-wrapper,.scb-textfield-wrapper{position:relative;width:100%}md-focus-ring.input-ring,md-ripple{border-radius:var(--md-sys-shape-corner-small);position:absolute;inset:0;pointer-events:none}md-focus-ring.input-ring{display:none;z-index:3}.ripple-wrapper[data-kb-focus=true] md-focus-ring.input-ring{display:block}md-ripple{z-index:0;--md-ripple-hover-color:transparent;--md-ripple-hover-opacity:0}input[type=search]::-webkit-search-cancel-button{appearance:none;display:none}.scb-textfield-clear,.scb-textfield-error-icon{position:absolute;right:var(--scb-textfield-trailing-inset);top:50%;transform:translateY(-50%);z-index:2}.scb-textfield-error-icon{pointer-events:none;font-size:var(--scb-textfield-trailing-icon-size);color:var(--md-sys-color-error)}.scb-textfield.has-error-icon{padding-right:calc(var(--scb-textfield-trailing-inset) + var(--scb-textfield-trailing-icon-size) + var(--scb-textfield-trailing-gap))}.scb-textfield-clear{width:var(--scb-textfield-trailing-icon-size);height:var(--scb-textfield-trailing-icon-size);padding:0;margin:0;border:0;background:0 0;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;color:var(--md-sys-color-on-surface)}:host([error]) .scb-textfield-clear{right:calc(var(--scb-textfield-trailing-inset) + var(--scb-textfield-trailing-icon-size) + var(--spacing-2))}.scb-textfield-clear:focus-visible{outline:2px solid var(--md-sys-color-primary);outline-offset:2px}.scb-textfield-clear svg{width:100%;height:100%;display:block}.scb-textfield-datepicker-button{position:absolute;right:var(--scb-textfield-trailing-inset);top:50%;transform:translateY(-50%);z-index:4}`],m);function x(){const e=l(s,this,f).call(this,this.spacing),t=l(s,this,f).call(this,this.spacingTop)??e,i=l(s,this,f).call(this,this.spacingBottom)??e,o=l(s,this,f).call(this,this.spacingLeft),d=l(s,this,f).call(this,this.spacingRight);t?this.style.setProperty("--scb-textfield-spacing-block-start",t):this.style.removeProperty("--scb-textfield-spacing-block-start"),i?this.style.setProperty("--scb-textfield-spacing-block-end",i):this.style.removeProperty("--scb-textfield-spacing-block-end"),o?this.style.setProperty("--scb-textfield-spacing-inline-start",o):this.style.removeProperty("--scb-textfield-spacing-inline-start"),d?this.style.setProperty("--scb-textfield-spacing-inline-end",d):this.style.removeProperty("--scb-textfield-spacing-inline-end")}function f(e){if(!e)return;const t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}function b(e=!1){const t=this.shadowRoot?.querySelector(".scb-textfield");if(!(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement))return!0;const i="Ogiltig inmatning.";let o="",d="customError";if(t.setCustomValidity(""),this.disabled)o="";else if(this._customValidationMessage)o=this._customValidationMessage,d="customError",t.setCustomValidity(o);else if(this.required&&!t.value)o=this.errorText||"Fyll i det här fältet.",d="valueMissing",t.setCustomValidity(o);else if(this.pattern&&t.value)try{new RegExp(this.pattern).test(t.value)||(o=this.errorText||i,d="patternMismatch",t.setCustomValidity(o))}catch{t.setCustomValidity("")}const p=e?t.reportValidity():t.checkValidity(),h=p?"":this._customValidationMessage||this.errorText||o||t.validationMessage||i,u=this.error,g=this._validationMessage;return this._validationMessage=h,this.error=this.disabled?!1:h?this._hasValidationBeenReported||u:u&&!this._hasValidationBeenReported&&!g,this._internals&&(p?this._internals.setValidity({}):this._internals.setValidity({[d]:!0},h,t)),(u!==this.error||g!==this._validationMessage)&&this.requestUpdate(),p}function y(){const e=this.shadowRoot?.querySelector(".scb-textfield");e&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&this._boundField!==e&&(l(s,this,_).call(this),this._boundField=e,this.type!=="time"&&e.addEventListener("input",this._onFieldInput),e.addEventListener("change",this._onFieldChange),e.addEventListener("select",this._onFieldSelect),e.addEventListener("focus",this._onFieldFocus),e.addEventListener("blur",this._onFieldBlur))}function _(){const e=this._boundField;e&&(e.removeEventListener("input",this._onFieldInput),e.removeEventListener("change",this._onFieldChange),e.removeEventListener("select",this._onFieldSelect),e.removeEventListener("focus",this._onFieldFocus),e.removeEventListener("blur",this._onFieldBlur),this._boundField=null)}function L(){this._showDatepicker=!1;const e=this.shadowRoot?.querySelector(".scb-textfield");if(e&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&(e.value="",e.setCustomValidity("")),this.value="",this.error=!1,this._internals){const t=this.disabled?null:"";this._internals.setFormValue(t),this._internals.setValidity({})}}function v(){const e=this.renderRoot?.querySelector(".ripple-wrapper");e&&(this._inputFocused&&this._kbShouldShowRing?e.setAttribute("data-kb-focus","true"):e.removeAttribute("data-kb-focus"))}r([n({type:String,reflect:!0})],a.prototype,"type",void 0);r([n({type:String})],a.prototype,"label",void 0);r([n({type:String,attribute:"supporting-text"})],a.prototype,"supportingText",void 0);r([n({type:String,attribute:"help-text"})],a.prototype,"helpText",void 0);r([n({type:String,attribute:"help-label"})],a.prototype,"helpLabel",void 0);r([n({type:String,attribute:"clear-label"})],a.prototype,"clearLabel",void 0);r([n({type:String,attribute:"date-button-label"})],a.prototype,"dateButtonLabel",void 0);r([n({type:String,attribute:"error-text"})],a.prototype,"errorText",void 0);r([n({type:String,attribute:"leading-icon"})],a.prototype,"leadingIcon",void 0);r([n({type:String})],a.prototype,"name",void 0);r([n({type:String})],a.prototype,"pattern",void 0);r([n({type:String,attribute:"value"})],a.prototype,"value",void 0);r([n({type:String})],a.prototype,"underLabel",void 0);r([n({type:Boolean,reflect:!0})],a.prototype,"error",void 0);r([n({type:Boolean,reflect:!0})],a.prototype,"disabled",void 0);r([n({type:Boolean,reflect:!0})],a.prototype,"required",void 0);r([n({type:String,reflect:!0})],a.prototype,"size",void 0);r([n({type:String,reflect:!0})],a.prototype,"spacing",void 0);r([n({type:String,attribute:"spacing-top",reflect:!0})],a.prototype,"spacingTop",void 0);r([n({type:String,attribute:"spacing-bottom",reflect:!0})],a.prototype,"spacingBottom",void 0);r([n({type:String,attribute:"spacing-left",reflect:!0})],a.prototype,"spacingLeft",void 0);r([n({type:String,attribute:"spacing-right",reflect:!0})],a.prototype,"spacingRight",void 0);r([$()],a.prototype,"_showDatepicker",void 0);a=r([z("scb-textfield")],a);
349
+ )}:host([size='large']){--scb-textfield-padding-x:var(--spacing-5);--scb-textfield-padding-y:calc(var(--spacing-5) - var(--spacing-1));--scb-textfield-min-height:var(--scb-control-size-large, var(--scale-12, 56px));--scb-textfield-leading-inset:var(--spacing-4);--scb-textfield-leading-icon-size:var(--icon-size-medium, 24px);--scb-textfield-leading-gap:var(--spacing-4);--scb-textfield-trailing-inset:var(--spacing-4);--scb-textfield-trailing-icon-size:var(--icon-size-medium, 24px);--scb-textfield-trailing-action-size:var(--scb-control-size-large, var(--scale-12, 56px))}:host([size='medium']),:host([size='small']){--scb-textfield-padding-x:var(--spacing-4);--scb-textfield-leading-inset:var(--spacing-3);--scb-textfield-leading-icon-size:var(--icon-size-small, 20px);--scb-textfield-leading-gap:var(--spacing-5);--scb-textfield-trailing-inset:var(--spacing-3);--scb-textfield-trailing-icon-size:var(--icon-size-small, 20px);--scb-textfield-trailing-gap:var(--spacing-3)}:host([size='medium']){--scb-textfield-padding-y:calc(var(--spacing-3) - var(--spacing-1));--scb-textfield-min-height:var(--scb-control-size-medium, var(--scale-10, 40px));--scb-textfield-trailing-action-size:var(--scb-control-size-medium, var(--scale-10, 40px))}:host([size='small']){--scb-textfield-padding-y:var(--spacing-1);--scb-textfield-min-height:var(--scb-control-size-small, var(--scale-08, 32px));--scb-textfield-trailing-action-size:var(--scb-control-size-small, var(--scale-08, 32px))}:host([type='number']){--scb-textfield-max-width:var(--scb-textfield-number-max-width)}:host([type='datetime-local']),:host([type='text']){--scb-textfield-max-width:var(--scb-textfield-text-max-width)}:host([type='search']){--scb-textfield-max-width:var(--scb-textfield-search-max-width)}:host([type='email']){--scb-textfield-max-width:var(--scb-textfield-email-max-width)}:host([type='password']){--scb-textfield-max-width:var(--scb-textfield-password-max-width)}:host([type='tel']){--scb-textfield-max-width:var(--scb-textfield-tel-max-width)}:host([type='url']){--scb-textfield-max-width:var(--scb-textfield-url-max-width)}:host([type='textarea']){--scb-textfield-max-width:var(--scb-textfield-textarea-max-width)}:host([type='date']),:host([type='time']){--scb-textfield-max-width:var(--scb-textfield-text-max-width)}input[type=time]::-webkit-calendar-picker-indicator{display:none;background:0 0}:host{display:flex;flex-direction:column;max-width:var(--scb-textfield-max-width)}:host([error]) .scb-textfield-supporting-text{color:var(--md-sys-color-error)}:host([error]) .scb-textfield{border-color:var(--md-sys-color-error)}:host([error]) .scb-textfield:focus-visible{border-color:var(--md-sys-color-error);box-shadow:inset 0 0 0 2px var(--md-sys-color-error)}:host([disabled]){opacity:.38;cursor:default}.scb-textfield-label{display:block;font-family:var(--scb-textfield-label-font-family);font-size:var(--scb-textfield-label-font-size);font-weight:var(--scb-textfield-label-font-weight);line-height:var(--scb-textfield-label-line-height);letter-spacing:var(--scb-textfield-label-letter-spacing)}.scb-textfield-label-row{display:flex;align-items:center;gap:var(--spacing-1, 2px)}.scb-textfield-label-row--without-supporting{margin-bottom:var(--scb-textfield-label-gap)}.scb-textfield-help-tooltip{display:inline-flex;align-items:center;flex:0 0 auto;line-height:0}.scb-textfield-help-button{--scb-icon-button-container-size:var(--scb-control-size-tiny, var(--scale-06, 24px));--scb-icon-button-icon-size:var(--icon-size-extra-small, 16px)}.scb-textfield-label--without-supporting,.scb-textfield-supporting-text{margin-bottom:var(--scb-textfield-label-gap)}.scb-textfield-supporting-text{display:block;font-family:var(--scb-textfield-supporting-font-family);font-size:var(--scb-textfield-supporting-font-size);line-height:var(--scb-textfield-supporting-line-height);font-weight:var(--scb-textfield-supporting-font-weight);letter-spacing:var(--scb-textfield-supporting-letter-spacing);color:var(--md-sys-color-on-surface-variant)}.scb-textfield{padding:var(--scb-textfield-padding-y) var(--scb-textfield-padding-x);block-size:var(--scb-textfield-min-height);min-height:var(--scb-textfield-min-height);border:1px solid var(--md-sys-color-outline);border-radius:var(--md-sys-shape-corner-small);font-size:var(--scb-textfield-font-size);font-family:var(--scb-textfield-font-family);line-height:var(--scb-textfield-line-height);font-weight:var(--scb-textfield-font-weight);letter-spacing:var(--scb-textfield-letter-spacing);width:100%;box-sizing:border-box;background-color:transparent;color:var(--md-sys-color-on-surface);position:relative;z-index:1}:host([type='date']) .scb-textfield,:host([type='search']) .scb-textfield{padding-right:var(--scb-textfield-trailing-reserved)}md-icon+.ripple-wrapper>.scb-textfield{padding-left:var(--scb-textfield-leading-padding)}.scb-textfield-icon{position:absolute;left:var(--scb-textfield-leading-inset);top:50%;transform:translateY(-50%);pointer-events:none;font-size:var(--scb-textfield-leading-icon-size);z-index:2}.scb-textfield:focus-visible{outline:0;box-shadow:inset 0 0 0 2px var(--md-sys-color-primary);border:1px solid var(--md-sys-color-primary)}.ripple-wrapper,.scb-textfield-wrapper{position:relative;width:100%}md-focus-ring.input-ring,md-ripple{border-radius:var(--md-sys-shape-corner-small);position:absolute;inset:0;pointer-events:none}md-focus-ring.input-ring{display:none;z-index:3}.ripple-wrapper[data-kb-focus=true] md-focus-ring.input-ring{display:block}md-ripple{z-index:0;--md-ripple-hover-color:transparent;--md-ripple-hover-opacity:0}input[type=search]::-webkit-search-cancel-button{appearance:none;display:none}.scb-textfield-clear,.scb-textfield-error-icon{position:absolute;right:var(--scb-textfield-trailing-inset);top:50%;transform:translateY(-50%);z-index:2}.scb-textfield-error-icon{pointer-events:none;font-size:var(--scb-textfield-trailing-icon-size);color:var(--md-sys-color-error)}.scb-textfield.has-error-icon{padding-right:calc(var(--scb-textfield-trailing-inset) + var(--scb-textfield-trailing-icon-size) + var(--scb-textfield-trailing-gap))}.scb-textfield-clear{width:var(--scb-textfield-trailing-icon-size);height:var(--scb-textfield-trailing-icon-size);padding:0;margin:0;border:0;background:0 0;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;color:var(--md-sys-color-on-surface)}:host([error]) .scb-textfield-clear{right:calc(var(--scb-textfield-trailing-inset) + var(--scb-textfield-trailing-icon-size) + var(--spacing-2))}.scb-textfield-clear:focus-visible{outline:2px solid var(--md-sys-color-primary);outline-offset:2px}.scb-textfield-clear svg{width:100%;height:100%;display:block}.scb-textfield-datepicker-button{position:absolute;right:var(--scb-textfield-trailing-inset);top:50%;transform:translateY(-50%);z-index:4}`],w);function S(){const s=b(h,this,x).call(this,this.spacing),t=b(h,this,x).call(this,this.spacingTop)??s,e=b(h,this,x).call(this,this.spacingBottom)??s,i=b(h,this,x).call(this,this.spacingLeft),n=b(h,this,x).call(this,this.spacingRight);t?this.style.setProperty("--scb-textfield-spacing-block-start",t):this.style.removeProperty("--scb-textfield-spacing-block-start"),e?this.style.setProperty("--scb-textfield-spacing-block-end",e):this.style.removeProperty("--scb-textfield-spacing-block-end"),i?this.style.setProperty("--scb-textfield-spacing-inline-start",i):this.style.removeProperty("--scb-textfield-spacing-inline-start"),n?this.style.setProperty("--scb-textfield-spacing-inline-end",n):this.style.removeProperty("--scb-textfield-spacing-inline-end")}function x(s){if(!s)return;const t=String(s).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}function m(s=!1){const t=this.shadowRoot?.querySelector(".scb-textfield");if(!(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement))return!0;const e="Ogiltig inmatning.";let i="",n="customError";if(t.setCustomValidity(""),this.disabled)i="";else if(this._customValidationMessage)i=this._customValidationMessage,n="customError",t.setCustomValidity(i);else if(this.required&&!t.value)i=this.errorText||"Fyll i det här fältet.",n="valueMissing",t.setCustomValidity(i);else if(this.pattern&&t.value)try{new RegExp(this.pattern).test(t.value)||(i=this.errorText||e,n="patternMismatch",t.setCustomValidity(i))}catch{t.setCustomValidity("")}const d=s?t.reportValidity():t.checkValidity(),c=d?"":this._customValidationMessage||this.errorText||i||t.validationMessage||e,a=this.error,o=this._validationMessage;return this._validationMessage=c,this.error=this.disabled?!1:c?this._hasValidationBeenReported||a:a&&!this._hasValidationBeenReported&&!o,this._internals&&(d?this._internals.setValidity({}):this._internals.setValidity({[n]:!0},c,t)),(a!==this.error||o!==this._validationMessage)&&this.requestUpdate(),d}function E(){const s=this.shadowRoot?.querySelector(".scb-textfield");s&&(s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement)&&this._boundField!==s&&(b(h,this,C).call(this),this._boundField=s,this.type!=="time"&&s.addEventListener("input",this._onFieldInput),s.addEventListener("change",this._onFieldChange),s.addEventListener("select",this._onFieldSelect),s.addEventListener("focus",this._onFieldFocus),s.addEventListener("blur",this._onFieldBlur))}function C(){const s=this._boundField;s&&(s.removeEventListener("input",this._onFieldInput),s.removeEventListener("change",this._onFieldChange),s.removeEventListener("select",this._onFieldSelect),s.removeEventListener("focus",this._onFieldFocus),s.removeEventListener("blur",this._onFieldBlur),this._boundField=null)}function O(){this._showDatepicker=!1;const s=this.shadowRoot?.querySelector(".scb-textfield");if(s&&(s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement)&&(s.value="",s.setCustomValidity("")),this.value="",this.error=!1,this._internals){const t=this.disabled?null:"";this._internals.setFormValue(t),this._internals.setValidity({})}}function _(){const s=this.renderRoot?.querySelector(".ripple-wrapper");s&&(this._inputFocused&&this._kbShouldShowRing?s.setAttribute("data-kb-focus","true"):s.removeAttribute("data-kb-focus"))}r([p({type:String,reflect:!0})],u.prototype,"type",void 0);r([p({type:String})],u.prototype,"label",void 0);r([p({type:String,attribute:"supporting-text"})],u.prototype,"supportingText",void 0);r([p({type:String,attribute:"help-text"})],u.prototype,"helpText",void 0);r([p({type:String,attribute:"help-label"})],u.prototype,"helpLabel",void 0);r([p({type:String,attribute:"clear-label"})],u.prototype,"clearLabel",void 0);r([p({type:String,attribute:"date-button-label"})],u.prototype,"dateButtonLabel",void 0);r([p({type:String,attribute:"error-text"})],u.prototype,"errorText",void 0);r([p({type:String,attribute:"leading-icon"})],u.prototype,"leadingIcon",void 0);r([p({type:String})],u.prototype,"name",void 0);r([p({type:String})],u.prototype,"pattern",void 0);r([p({type:String,attribute:"value"})],u.prototype,"value",void 0);r([p({type:String})],u.prototype,"underLabel",void 0);r([p({type:Boolean,reflect:!0})],u.prototype,"error",void 0);r([p({type:Boolean,reflect:!0})],u.prototype,"disabled",void 0);r([p({type:Boolean,reflect:!0})],u.prototype,"required",void 0);r([p({type:String,reflect:!0})],u.prototype,"size",void 0);r([p({type:String,reflect:!0})],u.prototype,"spacing",void 0);r([p({type:String,attribute:"spacing-top",reflect:!0})],u.prototype,"spacingTop",void 0);r([p({type:String,attribute:"spacing-bottom",reflect:!0})],u.prototype,"spacingBottom",void 0);r([p({type:String,attribute:"spacing-left",reflect:!0})],u.prototype,"spacingLeft",void 0);r([p({type:String,attribute:"spacing-right",reflect:!0})],u.prototype,"spacingRight",void 0);r([v()],u.prototype,"_showDatepicker",void 0);u=r([T("scb-textfield")],u);
@@ -1,4 +1,4 @@
1
- import{g as v,h as f,m as y,p as d,v as m,y as x}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import"../../vendor/icon.js";import"../../vendor/ripple.js";import{addLazyFocusRingListeners as _}from"../shared/lazy-focus-ring.js";import{t as l}from"../../vendor/decorate.js";import"../scb-chevron/scb-chevron.js";import"../scb-divider/scb-divider.js";(function(){try{var u=typeof globalThis<"u"?globalThis:window;if(!u.__scb_ce_guard_installed__){u.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(e,s,i){try{customElements.get(e)||t(e,s,i)}catch(c){var o=String(c||"");if(o.indexOf("already been used")===-1&&o.indexOf("NotSupportedError")===-1)throw c}}}}catch{}})();var b,h,r=(b=class extends f{constructor(...t){super(...t),this.expanded=!1,this.size="medium",this.label="",this.supportingText="",this.current=!1,this.itemHref="#",this.noDivider=!1,this._unique=h._uid(),this._overflowVisibleTimer=null,this._slotHasContent=!1,this._trailingSlotHasContent=!1,this._onSlotChange=()=>{const e=this.renderRoot.querySelector("slot:not([name])"),s=!!e&&e.assignedElements({flatten:!0}).length>0;this._slotHasContent!==s&&(this._slotHasContent=s,this.requestUpdate()),!this._slotHasContent&&this.expanded&&(this.expanded=!1),this._applyInertByExpanded()},this._toggleAccordion=()=>{if(!this._slotHasContent)return;const e=!this.expanded;this.setExpanded(e)},this._onKeyDown=e=>{const s=this.closest("scb-toc"),i=Array.from(s?.querySelectorAll("scb-toc-item")||[]).map(a=>({host:a,label:a.renderRoot.querySelector(".toc-item-label")||null})).filter(a=>!!a.label),o=i.findIndex(a=>a.host===this);if(o<0)return;const c=e.currentTarget?.classList?.contains("toc-chevron-button")??!1;switch(e.key){case"Enter":case" ":if(!c)return;e.preventDefault(),this._toggleAccordion();break;case"ArrowDown":e.preventDefault(),o<i.length-1&&i[o+1].label.focus();break;case"ArrowUp":e.preventDefault(),o>0&&i[o-1].label.focus();break;case"Home":e.preventDefault(),i.length&&i[0].label.focus();break;case"End":e.preventDefault(),i.length&&i[i.length-1].label.focus();break}}}setExpanded(t){this.expanded!==t&&(this.expanded=t)}static _uid(){return globalThis.crypto?.randomUUID?.()??`${h._uidPrefix}-${++h._uidSeq}`}firstUpdated(){this._applyInertByExpanded(),this._syncOverflowVisibilityByExpanded()}updated(t){t.has("expanded")&&(this._applyInertByExpanded(),this._syncOverflowVisibilityByExpanded(),this.dispatchEvent(new CustomEvent("expanded-changed",{detail:{expanded:this.expanded,label:this.label},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("expandedchanged",{detail:{expanded:this.expanded,label:this.label},bubbles:!0,composed:!0})))}connectedCallback(){super.connectedCallback(),this._removeLazyFocusRingListeners=_(this,this.renderRoot),this._slotHasContent=Array.from(this.children).some(t=>{const e=t.getAttribute("slot");return e===null||e===""}),this._trailingSlotHasContent=Array.from(this.children).some(t=>t.getAttribute("slot")==="trailing"),!this._slotHasContent&&this.expanded&&(this.expanded=!1)}disconnectedCallback(){this._removeLazyFocusRingListeners?.(),this._removeLazyFocusRingListeners=void 0,super.disconnectedCallback(),this._overflowVisibleTimer!==null&&(window.clearTimeout(this._overflowVisibleTimer),this._overflowVisibleTimer=null)}_applyInertByExpanded(){const t=this.renderRoot.querySelector(".scb-toc-item-bottom");t&&(this.expanded?(t.removeAttribute("inert"),t.setAttribute("aria-hidden","false"),this._restoreTabIndexesIfNeeded()):(t.setAttribute("inert",""),t.setAttribute("aria-hidden","true"),this._removeTabIndexesIfNeeded()))}_syncOverflowVisibilityByExpanded(){if(this._overflowVisibleTimer!==null&&(window.clearTimeout(this._overflowVisibleTimer),this._overflowVisibleTimer=null),this.removeAttribute("data-expanded-settled"),!this.expanded)return;const t=this.renderRoot.querySelector(".scb-toc-item-bottom");if(!t){this.setAttribute("data-expanded-settled","");return}const e=this._getTransitionMs(t);if(e<=0){this.setAttribute("data-expanded-settled","");return}this._overflowVisibleTimer=window.setTimeout(()=>{this._overflowVisibleTimer=null,this.expanded&&this.setAttribute("data-expanded-settled","")},e)}_getTransitionMs(t){const e=getComputedStyle(t),s=e.transitionDuration.split(",").map(n=>n.trim()),i=e.transitionDelay.split(",").map(n=>n.trim()),o=n=>{const p=parseFloat(n);return Number.isFinite(p)?n.endsWith("ms")?p:n.endsWith("s")?p*1e3:p:0},c=Math.max(s.length,i.length);let a=0;for(let n=0;n<c;n+=1){const p=o(s[n]??s[s.length-1]??"0s"),g=o(i[n]??i[i.length-1]??"0s");a=Math.max(a,p+g)}return Math.ceil(a)}_supportsInert(){return"inert"in HTMLElement.prototype}_collectFocusableFromSlot(){const t=this.renderRoot.querySelector("slot:not([name])");if(!t)return[];const e=t.assignedElements({flatten:!0}),s=[],i=o=>{o instanceof HTMLElement&&o.matches("a,button,input,select,textarea,[tabindex]")&&s.push(o)};return e.forEach(o=>{i(o),o.querySelectorAll?.("a,button,input,select,textarea,[tabindex]").forEach(c=>i(c))}),s}_removeTabIndexesIfNeeded(){this._supportsInert()||this._collectFocusableFromSlot().forEach(t=>{const e=t.getAttribute("tabindex");e!==null&&t.setAttribute("data-scb-prev-tabindex",e),t.setAttribute("tabindex","-1")})}_restoreTabIndexesIfNeeded(){this._supportsInert()||this._collectFocusableFromSlot().forEach(t=>{const e=t.getAttribute("data-scb-prev-tabindex");e!==null?(t.setAttribute("tabindex",e),t.removeAttribute("data-scb-prev-tabindex")):t.removeAttribute("tabindex")})}render(){const t=`bottom-${this._unique}`,e=`toc-label-${this._unique}`,s=`toc-chevron-${this._unique}`,i=this.supportingText.trim().length>0;return m`
1
+ import{g as v,h as f,m as y,p as d,v as m,y as x}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import"../../vendor/icon.js";import"../../vendor/ripple.js";import{t as _}from"../../vendor/lazy-focus-ring.js";import{t as l}from"../../vendor/decorate.js";import"../../vendor/scb-chevron.js";import"../scb-divider/scb-divider.js";(function(){try{var u=typeof globalThis<"u"?globalThis:window;if(!u.__scb_ce_guard_installed__){u.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(e,s,i){try{customElements.get(e)||t(e,s,i)}catch(c){var o=String(c||"");if(o.indexOf("already been used")===-1&&o.indexOf("NotSupportedError")===-1)throw c}}}}catch{}})();var b,h,r=(b=class extends f{constructor(...t){super(...t),this.expanded=!1,this.size="medium",this.label="",this.supportingText="",this.current=!1,this.itemHref="#",this.noDivider=!1,this._unique=h._uid(),this._overflowVisibleTimer=null,this._slotHasContent=!1,this._trailingSlotHasContent=!1,this._onSlotChange=()=>{const e=this.renderRoot.querySelector("slot:not([name])"),s=!!e&&e.assignedElements({flatten:!0}).length>0;this._slotHasContent!==s&&(this._slotHasContent=s,this.requestUpdate()),!this._slotHasContent&&this.expanded&&(this.expanded=!1),this._applyInertByExpanded()},this._toggleAccordion=()=>{if(!this._slotHasContent)return;const e=!this.expanded;this.setExpanded(e)},this._onKeyDown=e=>{const s=this.closest("scb-toc"),i=Array.from(s?.querySelectorAll("scb-toc-item")||[]).map(a=>({host:a,label:a.renderRoot.querySelector(".toc-item-label")||null})).filter(a=>!!a.label),o=i.findIndex(a=>a.host===this);if(o<0)return;const c=e.currentTarget?.classList?.contains("toc-chevron-button")??!1;switch(e.key){case"Enter":case" ":if(!c)return;e.preventDefault(),this._toggleAccordion();break;case"ArrowDown":e.preventDefault(),o<i.length-1&&i[o+1].label.focus();break;case"ArrowUp":e.preventDefault(),o>0&&i[o-1].label.focus();break;case"Home":e.preventDefault(),i.length&&i[0].label.focus();break;case"End":e.preventDefault(),i.length&&i[i.length-1].label.focus();break}}}setExpanded(t){this.expanded!==t&&(this.expanded=t)}static _uid(){return globalThis.crypto?.randomUUID?.()??`${h._uidPrefix}-${++h._uidSeq}`}firstUpdated(){this._applyInertByExpanded(),this._syncOverflowVisibilityByExpanded()}updated(t){t.has("expanded")&&(this._applyInertByExpanded(),this._syncOverflowVisibilityByExpanded(),this.dispatchEvent(new CustomEvent("expanded-changed",{detail:{expanded:this.expanded,label:this.label},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("expandedchanged",{detail:{expanded:this.expanded,label:this.label},bubbles:!0,composed:!0})))}connectedCallback(){super.connectedCallback(),this._removeLazyFocusRingListeners=_(this,this.renderRoot),this._slotHasContent=Array.from(this.children).some(t=>{const e=t.getAttribute("slot");return e===null||e===""}),this._trailingSlotHasContent=Array.from(this.children).some(t=>t.getAttribute("slot")==="trailing"),!this._slotHasContent&&this.expanded&&(this.expanded=!1)}disconnectedCallback(){this._removeLazyFocusRingListeners?.(),this._removeLazyFocusRingListeners=void 0,super.disconnectedCallback(),this._overflowVisibleTimer!==null&&(window.clearTimeout(this._overflowVisibleTimer),this._overflowVisibleTimer=null)}_applyInertByExpanded(){const t=this.renderRoot.querySelector(".scb-toc-item-bottom");t&&(this.expanded?(t.removeAttribute("inert"),t.setAttribute("aria-hidden","false"),this._restoreTabIndexesIfNeeded()):(t.setAttribute("inert",""),t.setAttribute("aria-hidden","true"),this._removeTabIndexesIfNeeded()))}_syncOverflowVisibilityByExpanded(){if(this._overflowVisibleTimer!==null&&(window.clearTimeout(this._overflowVisibleTimer),this._overflowVisibleTimer=null),this.removeAttribute("data-expanded-settled"),!this.expanded)return;const t=this.renderRoot.querySelector(".scb-toc-item-bottom");if(!t){this.setAttribute("data-expanded-settled","");return}const e=this._getTransitionMs(t);if(e<=0){this.setAttribute("data-expanded-settled","");return}this._overflowVisibleTimer=window.setTimeout(()=>{this._overflowVisibleTimer=null,this.expanded&&this.setAttribute("data-expanded-settled","")},e)}_getTransitionMs(t){const e=getComputedStyle(t),s=e.transitionDuration.split(",").map(n=>n.trim()),i=e.transitionDelay.split(",").map(n=>n.trim()),o=n=>{const p=parseFloat(n);return Number.isFinite(p)?n.endsWith("ms")?p:n.endsWith("s")?p*1e3:p:0},c=Math.max(s.length,i.length);let a=0;for(let n=0;n<c;n+=1){const p=o(s[n]??s[s.length-1]??"0s"),g=o(i[n]??i[i.length-1]??"0s");a=Math.max(a,p+g)}return Math.ceil(a)}_supportsInert(){return"inert"in HTMLElement.prototype}_collectFocusableFromSlot(){const t=this.renderRoot.querySelector("slot:not([name])");if(!t)return[];const e=t.assignedElements({flatten:!0}),s=[],i=o=>{o instanceof HTMLElement&&o.matches("a,button,input,select,textarea,[tabindex]")&&s.push(o)};return e.forEach(o=>{i(o),o.querySelectorAll?.("a,button,input,select,textarea,[tabindex]").forEach(c=>i(c))}),s}_removeTabIndexesIfNeeded(){this._supportsInert()||this._collectFocusableFromSlot().forEach(t=>{const e=t.getAttribute("tabindex");e!==null&&t.setAttribute("data-scb-prev-tabindex",e),t.setAttribute("tabindex","-1")})}_restoreTabIndexesIfNeeded(){this._supportsInert()||this._collectFocusableFromSlot().forEach(t=>{const e=t.getAttribute("data-scb-prev-tabindex");e!==null?(t.setAttribute("tabindex",e),t.removeAttribute("data-scb-prev-tabindex")):t.removeAttribute("tabindex")})}render(){const t=`bottom-${this._unique}`,e=`toc-label-${this._unique}`,s=`toc-chevron-${this._unique}`,i=this.supportingText.trim().length>0;return m`
2
2
  <div class="scb-toc-item">
3
3
  <div class=${`scb-toc-item-top${i?"":" no-supporting-text"}`}>
4
4
  <div>
package/mvc/scb-logo.svg CHANGED
@@ -1,21 +1,21 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <svg viewBox="-0.0002 -0.0066 1344.9076 377.9532" xmlns="http://www.w3.org/2000/svg">
3
- <defs>
4
- <style type="text/css">
5
- g {
6
- fill: #100f0d;
7
- }
8
- g:target {
9
- fill: #fff;
10
- }
11
- </style>
12
- </defs>
13
- <g transform="matrix(1.3333330154418945, 0, 0, -1.3333330154418945, 0, 377.9466552734375)" id="g10">
14
- <g transform="scale(0.1)" id="inverted">
15
- <path id="path14" d="m 1346.6,2515.59 c 0,48.24 -39.11,87.31 -87.4,87.31 -48.29,0 -87.4,-39.07 -87.4,-87.31 V 312.898 c 0,-48.339 39.11,-87.5 87.4,-87.5 48.29,0 87.4,39.161 87.4,87.5 V 1106.8 c 0,5.77 4.79,10.45 10.51,10.45 h 287.22 c 5.76,0 10.5,-4.68 10.5,-10.45 V 305.969 C 1654.83,137.02 1477.67,0 1259.2,0 1040.63,0 863.523,137.02 863.523,305.969 V 2528.77 c 0,168.86 177.107,305.88 395.677,305.88 218.47,0 395.63,-137.02 395.63,-305.88 V 1738.1 c 0,-5.86 -4.74,-10.45 -10.5,-10.45 h -287.22 c -5.72,0 -10.51,4.59 -10.51,10.45 v 777.49"/>
16
- <path id="path16" d="M 10.4414,2265.38 C -8.01563,2136.85 -1.52734,1926.1 26.1172,1807.73 56.4922,1678.71 231.645,1417.96 310.555,1296.86 389.566,1175.85 494.949,1049.49 493.375,880.922 V 477.18 c 0,-48.25 -39.109,-87.41 -87.406,-87.41 -48.145,0 -87.254,39.16 -87.254,87.41 v 618.79 c 0,5.76 -4.785,10.55 -10.645,10.55 H 20.9453 c -5.8711,0 -10.5039,-4.79 -10.5039,-10.55 V 458.719 c 0,-168.957 177.1056,-305.969 395.5276,-305.969 218.574,0 395.683,137.012 395.683,305.969 v 422.203 c -1.324,289.568 -80.332,331.748 -182.867,505.398 -73.445,124.71 -254.121,381.95 -284.398,510.97 -27.735,118.36 -26.516,255.39 -15.672,379.9 0,48.25 39.109,87.41 87.254,87.41 48.297,0 87.406,-39.16 87.406,-87.41 v -550.32 c 0,-5.77 4.746,-10.45 10.645,-10.45 h 287.085 c 5.911,0 10.547,4.68 10.547,10.45 v 538.51 c 0,169.06 -177.109,305.97 -395.683,305.97 -218.422,0 -395.5276,-136.91 -395.5276,-305.97"/>
17
- <path id="path18" d="m 1726.57,2547.82 h 440.8 c 182.04,0 329.61,-147.57 329.61,-329.52 v -462.24 c 0,-129.59 -84.97,-238.98 -202.16,-276.48 v -6.24 c 117.19,-37.4 202.16,-146.89 202.16,-276.58 V 491.148 c 0,-160.367 -130.2,-290.457 -290.45,-290.457 l -479.96,-0.293 c -5.91,0 -10.6,4.793 -10.6,10.454 V 2537.37 c 0,5.66 4.69,10.45 10.6,10.45 m 308.27,-229.22 c -5.97,0 -10.65,-4.78 -10.65,-10.55 v -729.33 c 0,-5.97 4.68,-10.65 10.65,-10.65 h 43.36 c 58.01,0 105.08,47.16 105.08,105.18 v 540.18 c 0,58 -47.07,105.17 -105.08,105.17 z m 0,-982.29 c -5.97,0 -10.65,-4.69 -10.65,-10.45 V 430.59 c 0,-5.86 4.68,-10.649 10.65,-10.649 h 51.85 c 58.12,0 105.09,47.18 105.09,105.188 v 706.011 c 0,58.19 -46.97,105.17 -105.09,105.17 h -51.85"/>
18
- </g>
19
- </g>
20
- <text style="fill: rgb(1, 1, 1); font-family: Roboto; font-size: 139.2px; font-weight: 500; stroke: rgb(0, 0, 0); white-space: pre;" x="455.182" y="234.25">Designsystem</text>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <svg viewBox="-0.0002 -0.0066 1344.9076 377.9532" xmlns="http://www.w3.org/2000/svg">
3
+ <defs>
4
+ <style type="text/css">
5
+ g {
6
+ fill: #100f0d;
7
+ }
8
+ g:target {
9
+ fill: #fff;
10
+ }
11
+ </style>
12
+ </defs>
13
+ <g transform="matrix(1.3333330154418945, 0, 0, -1.3333330154418945, 0, 377.9466552734375)" id="g10">
14
+ <g transform="scale(0.1)" id="inverted">
15
+ <path id="path14" d="m 1346.6,2515.59 c 0,48.24 -39.11,87.31 -87.4,87.31 -48.29,0 -87.4,-39.07 -87.4,-87.31 V 312.898 c 0,-48.339 39.11,-87.5 87.4,-87.5 48.29,0 87.4,39.161 87.4,87.5 V 1106.8 c 0,5.77 4.79,10.45 10.51,10.45 h 287.22 c 5.76,0 10.5,-4.68 10.5,-10.45 V 305.969 C 1654.83,137.02 1477.67,0 1259.2,0 1040.63,0 863.523,137.02 863.523,305.969 V 2528.77 c 0,168.86 177.107,305.88 395.677,305.88 218.47,0 395.63,-137.02 395.63,-305.88 V 1738.1 c 0,-5.86 -4.74,-10.45 -10.5,-10.45 h -287.22 c -5.72,0 -10.51,4.59 -10.51,10.45 v 777.49"/>
16
+ <path id="path16" d="M 10.4414,2265.38 C -8.01563,2136.85 -1.52734,1926.1 26.1172,1807.73 56.4922,1678.71 231.645,1417.96 310.555,1296.86 389.566,1175.85 494.949,1049.49 493.375,880.922 V 477.18 c 0,-48.25 -39.109,-87.41 -87.406,-87.41 -48.145,0 -87.254,39.16 -87.254,87.41 v 618.79 c 0,5.76 -4.785,10.55 -10.645,10.55 H 20.9453 c -5.8711,0 -10.5039,-4.79 -10.5039,-10.55 V 458.719 c 0,-168.957 177.1056,-305.969 395.5276,-305.969 218.574,0 395.683,137.012 395.683,305.969 v 422.203 c -1.324,289.568 -80.332,331.748 -182.867,505.398 -73.445,124.71 -254.121,381.95 -284.398,510.97 -27.735,118.36 -26.516,255.39 -15.672,379.9 0,48.25 39.109,87.41 87.254,87.41 48.297,0 87.406,-39.16 87.406,-87.41 v -550.32 c 0,-5.77 4.746,-10.45 10.645,-10.45 h 287.085 c 5.911,0 10.547,4.68 10.547,10.45 v 538.51 c 0,169.06 -177.109,305.97 -395.683,305.97 -218.422,0 -395.5276,-136.91 -395.5276,-305.97"/>
17
+ <path id="path18" d="m 1726.57,2547.82 h 440.8 c 182.04,0 329.61,-147.57 329.61,-329.52 v -462.24 c 0,-129.59 -84.97,-238.98 -202.16,-276.48 v -6.24 c 117.19,-37.4 202.16,-146.89 202.16,-276.58 V 491.148 c 0,-160.367 -130.2,-290.457 -290.45,-290.457 l -479.96,-0.293 c -5.91,0 -10.6,4.793 -10.6,10.454 V 2537.37 c 0,5.66 4.69,10.45 10.6,10.45 m 308.27,-229.22 c -5.97,0 -10.65,-4.78 -10.65,-10.55 v -729.33 c 0,-5.97 4.68,-10.65 10.65,-10.65 h 43.36 c 58.01,0 105.08,47.16 105.08,105.18 v 540.18 c 0,58 -47.07,105.17 -105.08,105.17 z m 0,-982.29 c -5.97,0 -10.65,-4.69 -10.65,-10.45 V 430.59 c 0,-5.86 4.68,-10.649 10.65,-10.649 h 51.85 c 58.12,0 105.09,47.18 105.09,105.188 v 706.011 c 0,58.19 -46.97,105.17 -105.09,105.17 h -51.85"/>
18
+ </g>
19
+ </g>
20
+ <text style="fill: rgb(1, 1, 1); font-family: Roboto; font-size: 139.2px; font-weight: 500; stroke: rgb(0, 0, 0); white-space: pre;" x="455.182" y="234.25">Designsystem</text>
21
21
  </svg>
package/mvc/scb.svg CHANGED
@@ -1,14 +1,14 @@
1
- <svg
2
- xmlns="http://www.w3.org/2000/svg"
3
- xmlns:xlink="http://www.w3.org/1999/xlink"
4
- aria-hidden="true"
5
- role="img"
6
- width="48"
7
- height="48"
8
- preserveAspectRatio="xMidYMid meet"
9
- viewBox="0 0 1300 1300"
10
- >
11
- <path d="M539.3,128.2c0-19.3-15.7-35-35-35c-19.3,0-35,15.6-35,35v882.1c0,19.4,15.7,35,35,35c19.3,0,35-15.7,35-35V692.4 c0-2.3,1.9-4.2,4.2-4.2h115c2.3,0,4.2,1.9,4.2,4.2v320.7c0,67.7-71,122.5-158.4,122.5c-87.5,0-158.5-54.9-158.5-122.5V122.9 c0-67.6,70.9-122.5,158.5-122.5c87.5,0,158.4,54.9,158.4,122.5v316.6c0,2.3-1.9,4.2-4.2,4.2h-115c-2.3,0-4.2-1.8-4.2-4.2V128.2z" />
12
- <path d="M4.2,228.4c-7.4,51.5-4.8,135.9,6.3,183.3c12.2,51.7,82.3,156.1,113.9,204.6c31.6,48.5,73.8,99.1,73.2,166.6v161.7 c0,19.3-15.7,35-35,35c-19.3,0-34.9-15.7-34.9-35V696.7c0-2.3-1.9-4.2-4.3-4.2H8.4c-2.4,0-4.2,1.9-4.2,4.2v255.2 c0,67.7,70.9,122.5,158.4,122.5c87.5,0,158.5-54.9,158.5-122.5V782.8c-0.5-116-32.2-132.9-73.2-202.4 c-29.4-49.9-101.8-153-113.9-204.6c-11.1-47.4-10.6-102.3-6.3-152.1c0-19.3,15.7-35,34.9-35c19.3,0,35,15.7,35,35V444 c0,2.3,1.9,4.2,4.3,4.2h115c2.4,0,4.2-1.9,4.2-4.2V228.4c0-67.7-70.9-122.5-158.5-122.5C75.1,105.8,4.2,160.7,4.2,228.4" />
13
- <path d="M814.9,600.4c-2.4,0-4.3,1.9-4.3,4.2v358.5c0,2.3,1.9,4.3,4.3,4.3h20.8c23.3,0,42.1-18.9,42.1-42.1V642.6 c0-23.3-18.8-42.1-42.1-42.1H814.9z M814.9,207.1c-2.4,0-4.3,1.9-4.3,4.2v292.1c0,2.4,1.9,4.3,4.3,4.3h17.4 c23.2,0,42.1-18.9,42.1-42.1V249.2c0-23.2-18.9-42.1-42.1-42.1H814.9z M691.5,115.3H868c72.9,0,132,59.1,132,132v185.1 c0,51.9-34,95.7-81,110.7v2.5c46.9,15,81,58.8,81,110.8v282.6c0,64.2-52.1,116.3-116.3,116.3l-192.2,0.1c-2.4,0-4.2-1.9-4.2-4.2 V119.4C687.2,117.2,689.1,115.3,691.5,115.3" />
1
+ <svg
2
+ xmlns="http://www.w3.org/2000/svg"
3
+ xmlns:xlink="http://www.w3.org/1999/xlink"
4
+ aria-hidden="true"
5
+ role="img"
6
+ width="48"
7
+ height="48"
8
+ preserveAspectRatio="xMidYMid meet"
9
+ viewBox="0 0 1300 1300"
10
+ >
11
+ <path d="M539.3,128.2c0-19.3-15.7-35-35-35c-19.3,0-35,15.6-35,35v882.1c0,19.4,15.7,35,35,35c19.3,0,35-15.7,35-35V692.4 c0-2.3,1.9-4.2,4.2-4.2h115c2.3,0,4.2,1.9,4.2,4.2v320.7c0,67.7-71,122.5-158.4,122.5c-87.5,0-158.5-54.9-158.5-122.5V122.9 c0-67.6,70.9-122.5,158.5-122.5c87.5,0,158.4,54.9,158.4,122.5v316.6c0,2.3-1.9,4.2-4.2,4.2h-115c-2.3,0-4.2-1.8-4.2-4.2V128.2z" />
12
+ <path d="M4.2,228.4c-7.4,51.5-4.8,135.9,6.3,183.3c12.2,51.7,82.3,156.1,113.9,204.6c31.6,48.5,73.8,99.1,73.2,166.6v161.7 c0,19.3-15.7,35-35,35c-19.3,0-34.9-15.7-34.9-35V696.7c0-2.3-1.9-4.2-4.3-4.2H8.4c-2.4,0-4.2,1.9-4.2,4.2v255.2 c0,67.7,70.9,122.5,158.4,122.5c87.5,0,158.5-54.9,158.5-122.5V782.8c-0.5-116-32.2-132.9-73.2-202.4 c-29.4-49.9-101.8-153-113.9-204.6c-11.1-47.4-10.6-102.3-6.3-152.1c0-19.3,15.7-35,34.9-35c19.3,0,35,15.7,35,35V444 c0,2.3,1.9,4.2,4.3,4.2h115c2.4,0,4.2-1.9,4.2-4.2V228.4c0-67.7-70.9-122.5-158.5-122.5C75.1,105.8,4.2,160.7,4.2,228.4" />
13
+ <path d="M814.9,600.4c-2.4,0-4.3,1.9-4.3,4.2v358.5c0,2.3,1.9,4.3,4.3,4.3h20.8c23.3,0,42.1-18.9,42.1-42.1V642.6 c0-23.3-18.8-42.1-42.1-42.1H814.9z M814.9,207.1c-2.4,0-4.3,1.9-4.3,4.2v292.1c0,2.4,1.9,4.3,4.3,4.3h17.4 c23.2,0,42.1-18.9,42.1-42.1V249.2c0-23.2-18.9-42.1-42.1-42.1H814.9z M691.5,115.3H868c72.9,0,132,59.1,132,132v185.1 c0,51.9-34,95.7-81,110.7v2.5c46.9,15,81,58.8,81,110.8v282.6c0,64.2-52.1,116.3-116.3,116.3l-192.2,0.1c-2.4,0-4.2-1.9-4.2-4.2 V119.4C687.2,117.2,689.1,115.3,691.5,115.3" />
14
14
  </svg>
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./md-focus-ring.js","./rolldown-runtime.js","./vendor.js","./attachable-controller.js","./vendor-lit.js"])))=>i.map(i=>d[i]);
2
+ import{t as f}from"./rolldown-runtime.js";import{t as _}from"./preload-helper.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var n=customElements.define.bind(customElements);customElements.define=function(s,t,d){try{customElements.get(s)||n(s,t,d)}catch(i){var r=String(i||"");if(r.indexOf("already been used")===-1&&r.indexOf("NotSupportedError")===-1)throw i}}}}catch{}})();var v=f({addLazyFocusRingListeners:()=>l,ensureFocusRingOnFocusVisible:()=>c,ensureFocusRingOnTab:()=>u,ensureFocusRingReady:()=>o}),a,o=()=>{customElements.get("md-focus-ring")||(a??(a=_(()=>import("./md-focus-ring.js").then(e=>e.t).then(()=>{}),__vite__mapDeps([0,1,2,3,4]),import.meta.url)))},c=e=>{const n=e.composedPath()[0];n instanceof HTMLElement&&n.matches(":focus-visible")&&o()},u=e=>{e.key==="Tab"&&o()},l=(...e)=>{const n=c,s=u;for(const t of e)t.addEventListener("focusin",n),t.addEventListener("keydown",s);return()=>{for(const t of e)t.removeEventListener("focusin",n),t.removeEventListener("keydown",s)}};export{v as i,c as n,o as r,l as t};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ripple.js","./rolldown-runtime.js","./vendor.js","./attachable-controller.js","./vendor-lit.js"])))=>i.map(i=>d[i]);
2
+ import{t as s}from"./preload-helper.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var r=customElements.define.bind(customElements);customElements.define=function(t,n,d){try{customElements.get(t)||r(t,n,d)}catch(a){var o=String(a||"");if(o.indexOf("already been used")===-1&&o.indexOf("NotSupportedError")===-1)throw a}}}}catch{}})();var i,l=()=>(i??(i=s(()=>import("./ripple.js").then(e=>e.t).then(()=>{}),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),i),f=async(e,r,t,n=!1)=>{!e||!r||(e.control=r,r.matches(":hover")&&(e.hovered=!0),t?.type==="pointerenter"?e.handlePointerenter?.(t):t?.type==="pointerdown"&&await e.handlePointerdown?.(t),n&&e.handleClick?.())};export{l as ensureRippleReady,f as syncRippleToControl};
@@ -1,4 +1,4 @@
1
- import{h,m as v,p as d,v as p,y as f}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as c}from"../../vendor/decorate.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var r=customElements.define.bind(customElements);customElements.define=function(o,a,l){try{customElements.get(o)||r(o,a,l)}catch(i){var s=String(i||"");if(s.indexOf("already been used")===-1&&s.indexOf("NotSupportedError")===-1)throw i}}}}catch{}})();var n,t=(n=class extends h{constructor(...r){super(...r),this.open=!1}render(){return p`
1
+ import{h,m as v,p as d,v as p,y as f}from"./vendor.js";import"./vendor-lit.js";import{t as c}from"./decorate.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var r=customElements.define.bind(customElements);customElements.define=function(o,a,l){try{customElements.get(o)||r(o,a,l)}catch(i){var s=String(i||"");if(s.indexOf("already been used")===-1&&s.indexOf("NotSupportedError")===-1)throw i}}}}catch{}})();var n,t=(n=class extends h{constructor(...r){super(...r),this.open=!1}render(){return p`
2
2
  <svg
3
3
  class="chevron-icon"
4
4
  viewBox="0 0 24 24"
@@ -0,0 +1,11 @@
1
+ import{_ as l,g as o}from"./vendor.js";import"./vendor-lit.js";(function(){try{var a=typeof globalThis<"u"?globalThis:window;if(!a.__scb_ce_guard_installed__){a.__scb_ce_guard_installed__=!0;var h=customElements.define.bind(customElements);customElements.define=function(e,t,v){try{customElements.get(e)||h(e,t,v)}catch(r){var n=String(r||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw r}}}}catch{}})();var c=new Map([["arrow_forward","M12 4l-1.41 1.41L15.17 10H4v2h11.17l-4.58 4.59L12 18l8-8-8-8Z"],["chevron_left","M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12l4.58-4.59Z"],["chevron_right","M8.59 16.59 10 18l6-6-6-6-1.41 1.41L13.17 12l-4.58 4.59Z"],["close","M18.3 5.71 16.89 4.3 12 9.17 7.11 4.3 5.7 5.71 10.59 10.6 5.7 15.49 7.11 16.9 12 12.01l4.89 4.89 1.41-1.41-4.89-4.89 4.89-4.89Z"],["menu","M3 6h18v2H3V6Zm0 5h18v2H3v-2Zm0 5h18v2H3v-2Z"],["open_in_new","M14 3h7v7h-2V6.41l-9.83 9.83-1.41-1.41L17.59 5H14V3ZM5 5h6v2H7v10h10v-4h2v6H5V5Z"],["payments","M3 6h18v12H3V6Zm2 2v8h14V8H5Zm7 2a2 2 0 1 1 0 4 2 2 0 0 1 0-4ZM7 9h2v2H7V9Zm8 4h2v2h-2v-2Z"],["person_4","M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm-8 8c0-3.31 3.58-6 8-6s8 2.69 8 6v1H4v-1Z"],["price_change","M12 2 3 6v6c0 5 3.84 9.74 9 10 5.16-.26 9-5 9-10V6l-9-4Zm1 15h-2v-2h2v2Zm0-4h-2V7h2v6Zm-7 6.5V15h2v2.6a9.1 9.1 0 0 1-2-3.1Zm12-1.9V15h2a9.1 9.1 0 0 1-2 3.1Z"],["search","M9.5 3a6.5 6.5 0 0 1 5.17 10.44l5.45 5.44-1.42 1.42-5.44-5.45A6.5 6.5 0 1 1 9.5 3Zm0 2a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9Z"],["trending_up","M16 6h5v5h-2V9.41l-6.17 6.17-4-4L3.41 17 2 15.59l6.83-6.83 4 4L17.59 8H16V6Z"],["volume_up","M3 9v6h4l5 5V4L7 9H3Zm13.5 3a4.5 4.5 0 0 0-2.5-4.03v8.06A4.5 4.5 0 0 0 16.5 12Zm-2.5-8.7v2.06A7 7 0 0 1 18 12a7 7 0 0 1-4 6.64v2.06A9 9 0 0 0 20 12a9 9 0 0 0-6-8.7Z"],["work","M10 4h4a2 2 0 0 1 2 2v2h4a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h4V6a2 2 0 0 1 2-2Zm0 4h4V6h-4v2Zm-6 2v8h16v-8H4Zm6 3h4v2h-4v-2Z"]]);function m(a,h="material-icon",e){const t=(a||"").trim(),v=c.get(t);return v?l`
2
+ <svg
3
+ class=${`${h} scb-svg-icon`}
4
+ part=${e||o}
5
+ aria-hidden="true"
6
+ viewBox="0 0 24 24"
7
+ focusable="false"
8
+ >
9
+ <path d=${v}></path>
10
+ </svg>
11
+ `:o}export{m as t};