@oslokommune/punkt-elements 18.5.2 → 18.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/dist/{calendar-Cc0bjLPC.cjs → calendar-CA1mz04B.cjs} +1 -1
- package/dist/{calendar-iXilYFBa.js → calendar-CBghTpkZ.js} +10 -138
- package/dist/{checkbox-D6j7amKX.cjs → checkbox-BxDlOeQR.cjs} +1 -1
- package/dist/{checkbox-DcvKYDU2.js → checkbox-U3KfKBLv.js} +1 -1
- package/dist/{combobox-CiT2YvLb.js → combobox-8YJJthxD.js} +1 -1
- package/dist/{combobox-BT1LB0gl.cjs → combobox-CjQiFSKd.cjs} +1 -1
- package/dist/components/datepicker/datepicker-base.d.ts +4 -0
- package/dist/components/datepicker/datepicker.d.ts +3 -1
- package/dist/{datepicker-Kk64p81z.js → datepicker-9zom2dyI.js} +58 -29
- package/dist/{datepicker-FUNnqaCT.cjs → datepicker-CN_9JAxo.cjs} +22 -5
- package/dist/{header-DybJSDQQ.cjs → header-D_UJ70pO.cjs} +1 -1
- package/dist/{header-DU10rGhU.js → header-NPxBtRhJ.js} +1 -1
- package/dist/{input-element-uajHIWAO.cjs → input-element-BaXrl0h5.cjs} +1 -1
- package/dist/{input-element-zXKo9jpe.js → input-element-DQri-M3O.js} +2 -2
- package/dist/pkt-calendar.cjs +1 -1
- package/dist/pkt-calendar.js +1 -1
- package/dist/pkt-checkbox.cjs +1 -1
- package/dist/pkt-checkbox.js +1 -1
- package/dist/pkt-combobox.cjs +1 -1
- package/dist/pkt-combobox.js +1 -1
- package/dist/pkt-datepicker.cjs +1 -1
- package/dist/pkt-datepicker.js +1 -1
- package/dist/pkt-header.cjs +1 -1
- package/dist/pkt-header.js +1 -1
- package/dist/pkt-index.cjs +1 -1
- package/dist/pkt-index.js +10 -10
- package/dist/pkt-radiobutton.cjs +1 -1
- package/dist/pkt-radiobutton.js +1 -1
- package/dist/pkt-select.cjs +1 -1
- package/dist/pkt-select.js +1 -1
- package/dist/pkt-textarea.cjs +1 -1
- package/dist/pkt-textarea.js +1 -1
- package/dist/pkt-textinput.cjs +1 -1
- package/dist/pkt-textinput.js +1 -1
- package/dist/pkt-timepicker.cjs +1 -1
- package/dist/pkt-timepicker.js +1 -1
- package/dist/{radiobutton-BuOLykKo.cjs → radiobutton-DbHXj09u.cjs} +1 -1
- package/dist/{radiobutton-Dr5OQ0IY.js → radiobutton-Dm-IW6aF.js} +1 -1
- package/dist/{select-Cd_saUE7.js → select-B6ZUZ3tj.js} +1 -1
- package/dist/{select-Cc7c9dRd.cjs → select-ZlTO1P9_.cjs} +1 -1
- package/dist/shared-types/calendar.d.ts +67 -0
- package/dist/shared-types/index.d.ts +2 -1
- package/dist/{textarea-xTcafucE.cjs → textarea-BHISs7EC.cjs} +1 -1
- package/dist/{textarea-MJvpE_yV.js → textarea-CTlA6EGR.js} +1 -1
- package/dist/{textinput-B4VnZzsa.cjs → textinput-THsTffFY.cjs} +1 -1
- package/dist/{textinput-Cr7Z9ilH.js → textinput-kp1242Ci.js} +1 -1
- package/dist/{timepicker-srjt12dI.js → timepicker-BBaAVpH_.js} +1 -1
- package/dist/{timepicker-85ViMBd6.cjs → timepicker-Cwy8K6Af.cjs} +1 -1
- package/package.json +2 -2
- package/src/components/calendar/calendar.ts +8 -9
- package/src/components/datepicker/datepicker-base.ts +14 -0
- package/src/components/datepicker/datepicker-multiple.ts +3 -0
- package/src/components/datepicker/datepicker-range.ts +6 -0
- package/src/components/datepicker/datepicker-single.ts +3 -1
- package/src/components/datepicker/datepicker.accessibility.test.ts +24 -3
- package/src/components/datepicker/datepicker.ts +63 -63
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require("./element-DRc10X2R.cjs"),t=require("./class-map-BEib48YL.cjs"),n=require("./if-defined-BeVQnl3C.cjs"),r=require("./element-with-slot-DgtT8lCH.cjs");require("./icon-DBFTFd-J.cjs");const i=require("./ref-BkV4Cd8U.cjs"),a=require("./converters-BJ9Fe0kW.cjs");require("./calendar-
|
|
1
|
+
const e=require("./element-DRc10X2R.cjs"),t=require("./class-map-BEib48YL.cjs"),n=require("./if-defined-BeVQnl3C.cjs"),r=require("./element-with-slot-DgtT8lCH.cjs");require("./icon-DBFTFd-J.cjs");const i=require("./ref-BkV4Cd8U.cjs"),a=require("./converters-BJ9Fe0kW.cjs");require("./calendar-CA1mz04B.cjs"),require("./tag-Cojf4jgA.cjs");const o=require("./repeat-uBgVG8Ch.cjs"),s=require("./utils-63cRpWut.cjs"),c=require("./input-element-BaXrl0h5.cjs");require("./input-wrapper-791L3L--.cjs");var l=class extends e.t{constructor(...e){super(...e),this.dates=[],this.dateformat=`dd.MM.yyyy`,this.className=`pkt-datepicker__tags`,this.idBase=s.n()}render(){return this.classes={"pkt-date-tags":!0,[this.className]:!0},e._`
|
|
2
2
|
<div class=${t.t(this.classes)} aria-live="polite">
|
|
3
3
|
${Array.isArray(this.dates)&&this.dates[0]?o.t(a.h((this.dates??[]).filter(Boolean)),e=>e,t=>e._` <pkt-tag
|
|
4
4
|
id=${this.idBase+t+`-tag`}
|
|
@@ -35,7 +35,7 @@ const e=require("./element-DRc10X2R.cjs"),t=require("./class-map-BEib48YL.cjs"),
|
|
|
35
35
|
@close=${()=>{this.hide(),this.dispatchEvent(new CustomEvent(`close`,{bubbles:!0,composed:!0}))}}
|
|
36
36
|
></pkt-calendar>`:e.h}
|
|
37
37
|
</div>
|
|
38
|
-
`}};e.n([e.u({type:Boolean,reflect:!0})],A.prototype,`open`,void 0),e.n([e.u({type:Boolean})],A.prototype,`multiple`,void 0),e.n([e.u({type:Boolean})],A.prototype,`range`,void 0),e.n([e.u({type:Boolean})],A.prototype,`weeknumbers`,void 0),e.n([e.u({type:Boolean})],A.prototype,`withcontrols`,void 0),e.n([e.u({type:Number})],A.prototype,`maxMultiple`,void 0),e.n([e.u({type:Array})],A.prototype,`selected`,void 0),e.n([e.u({type:String})],A.prototype,`earliest`,void 0),e.n([e.u({type:String})],A.prototype,`latest`,void 0),e.n([e.u({type:Array})],A.prototype,`excludedates`,void 0),e.n([e.u({type:Array})],A.prototype,`excludeweekdays`,void 0),e.n([e.u({type:String})],A.prototype,`currentmonth`,void 0),e.n([e.u({type:String})],A.prototype,`today`,void 0),e.n([e.l()],A.prototype,`_hasBeenOpened`,void 0);try{e.d(`pkt-datepicker-popup`)(A)}catch{console.warn(`Forsøker å definere <pkt-datepicker-popup>, men den er allerede definert`)}var j=class extends e.t{constructor(...e){super(...e),this.inputType=`date`,this.id=``,this.readonly=!1,this.disabled=!1,this.inputClasses={},this.inputSize=`medium`,this.inputRef=i.t(),this.btnRef=i.t()}get inputElement(){return this.inputRef.value}get buttonElement(){return this.btnRef.value}get isInputReadonly(){return this.readonly||this.inputType===`text`}dispatchToggleCalendar(e){this.readonly||this.dispatchEvent(new CustomEvent(`toggle-calendar`,{detail:e,bubbles:!0,composed:!0}))}dispatchInput(e){this.dispatchEvent(new CustomEvent(`input-change`,{detail:e,bubbles:!0,composed:!0}))}dispatchFocus(){this.dispatchEvent(new CustomEvent(`input-focus`,{bubbles:!0,composed:!0}))}dispatchBlur(e){this.dispatchEvent(new CustomEvent(`input-blur`,{detail:e,bubbles:!0,composed:!0}))}dispatchChange(e){this.dispatchEvent(new CustomEvent(`input-changed`,{detail:e,bubbles:!0,composed:!0}))}renderCalendarButton(){return e._`
|
|
38
|
+
`}};e.n([e.u({type:Boolean,reflect:!0})],A.prototype,`open`,void 0),e.n([e.u({type:Boolean})],A.prototype,`multiple`,void 0),e.n([e.u({type:Boolean})],A.prototype,`range`,void 0),e.n([e.u({type:Boolean})],A.prototype,`weeknumbers`,void 0),e.n([e.u({type:Boolean})],A.prototype,`withcontrols`,void 0),e.n([e.u({type:Number})],A.prototype,`maxMultiple`,void 0),e.n([e.u({type:Array})],A.prototype,`selected`,void 0),e.n([e.u({type:String})],A.prototype,`earliest`,void 0),e.n([e.u({type:String})],A.prototype,`latest`,void 0),e.n([e.u({type:Array})],A.prototype,`excludedates`,void 0),e.n([e.u({type:Array})],A.prototype,`excludeweekdays`,void 0),e.n([e.u({type:String})],A.prototype,`currentmonth`,void 0),e.n([e.u({type:String})],A.prototype,`today`,void 0),e.n([e.l()],A.prototype,`_hasBeenOpened`,void 0);try{e.d(`pkt-datepicker-popup`)(A)}catch{console.warn(`Forsøker å definere <pkt-datepicker-popup>, men den er allerede definert`)}var j=class extends e.t{constructor(...e){super(...e),this.inputType=`date`,this.id=``,this.readonly=!1,this.disabled=!1,this.inputClasses={},this.inputSize=`medium`,this.hasError=!1,this.hasHelptext=!1,this.inputRef=i.t(),this.btnRef=i.t()}get describedBy(){return this.hasHelptext?`${this.id}-input-helptext`:void 0}get errorMessageId(){return this.hasError?`${this.id}-input-error`:void 0}get inputElement(){return this.inputRef.value}get buttonElement(){return this.btnRef.value}get isInputReadonly(){return this.readonly||this.inputType===`text`}dispatchToggleCalendar(e){this.readonly||this.dispatchEvent(new CustomEvent(`toggle-calendar`,{detail:e,bubbles:!0,composed:!0}))}dispatchInput(e){this.dispatchEvent(new CustomEvent(`input-change`,{detail:e,bubbles:!0,composed:!0}))}dispatchFocus(){this.dispatchEvent(new CustomEvent(`input-focus`,{bubbles:!0,composed:!0}))}dispatchBlur(e){this.dispatchEvent(new CustomEvent(`input-blur`,{detail:e,bubbles:!0,composed:!0}))}dispatchChange(e){this.dispatchEvent(new CustomEvent(`input-changed`,{detail:e,bubbles:!0,composed:!0}))}renderCalendarButton(){return e._`
|
|
39
39
|
<button
|
|
40
40
|
class="${t.t(D.getButtonClasses(this.inputSize))}"
|
|
41
41
|
type="button"
|
|
@@ -47,7 +47,7 @@ const e=require("./element-DRc10X2R.cjs"),t=require("./class-map-BEib48YL.cjs"),
|
|
|
47
47
|
<pkt-icon name="calendar"></pkt-icon>
|
|
48
48
|
<span class="pkt-btn__text">${this.pktStrings.get(`datepicker`).openPicker}</span>
|
|
49
49
|
</button>
|
|
50
|
-
`}createRenderRoot(){return this}};e.n([e.u({type:String})],j.prototype,`inputType`,void 0),e.n([e.u({type:String})],j.prototype,`id`,void 0),e.n([e.u({type:String})],j.prototype,`min`,void 0),e.n([e.u({type:String})],j.prototype,`max`,void 0),e.n([e.u({type:String})],j.prototype,`placeholder`,void 0),e.n([e.u({type:Boolean})],j.prototype,`readonly`,void 0),e.n([e.u({type:Boolean})],j.prototype,`disabled`,void 0),e.n([e.u({type:Object})],j.prototype,`inputClasses`,void 0),e.n([e.u({type:String})],j.prototype,`inputSize`,void 0),e.n([e.u({type:Object})],j.prototype,`internals`,void 0);var M=class extends j{constructor(...e){super(...e),this.value=``}dispatchManageValidity(e){this.dispatchEvent(new CustomEvent(`manage-validity`,{detail:e,bubbles:!0,composed:!0}))}render(){return e._`
|
|
50
|
+
`}createRenderRoot(){return this}};e.n([e.u({type:String})],j.prototype,`inputType`,void 0),e.n([e.u({type:String})],j.prototype,`id`,void 0),e.n([e.u({type:String})],j.prototype,`min`,void 0),e.n([e.u({type:String})],j.prototype,`max`,void 0),e.n([e.u({type:String})],j.prototype,`placeholder`,void 0),e.n([e.u({type:Boolean})],j.prototype,`readonly`,void 0),e.n([e.u({type:Boolean})],j.prototype,`disabled`,void 0),e.n([e.u({type:Object})],j.prototype,`inputClasses`,void 0),e.n([e.u({type:String})],j.prototype,`inputSize`,void 0),e.n([e.u({type:Object})],j.prototype,`internals`,void 0),e.n([e.u({type:Boolean})],j.prototype,`hasError`,void 0),e.n([e.u({type:Boolean})],j.prototype,`hasHelptext`,void 0);var M=class extends j{constructor(...e){super(...e),this.value=``}dispatchManageValidity(e){this.dispatchEvent(new CustomEvent(`manage-validity`,{detail:e,bubbles:!0,composed:!0}))}render(){return e._`
|
|
51
51
|
<div class="pkt-input__container">
|
|
52
52
|
<input
|
|
53
53
|
class="${t.t(this.inputClasses)}"
|
|
@@ -58,7 +58,9 @@ const e=require("./element-DRc10X2R.cjs"),t=require("./class-map-BEib48YL.cjs"),
|
|
|
58
58
|
max=${n.t(this.max)}
|
|
59
59
|
placeholder=${n.t(this.placeholder)}
|
|
60
60
|
?readonly=${this.isInputReadonly}
|
|
61
|
-
aria-describedby
|
|
61
|
+
aria-describedby=${n.t(this.describedBy)}
|
|
62
|
+
aria-invalid=${this.hasError}
|
|
63
|
+
aria-errormessage=${n.t(this.errorMessageId)}
|
|
62
64
|
@click=${e=>{e.preventDefault(),this.dispatchToggleCalendar(e)}}
|
|
63
65
|
@touchend=${e=>{e.preventDefault(),this.dispatchToggleCalendar(e)}}
|
|
64
66
|
?disabled=${this.disabled}
|
|
@@ -75,6 +77,9 @@ const e=require("./element-DRc10X2R.cjs"),t=require("./class-map-BEib48YL.cjs"),
|
|
|
75
77
|
<div class="pkt-input__container">
|
|
76
78
|
${this.showRangeLabels?e._` <div class="pkt-input-prefix">${this.pktStrings.get(`generic`).from}</div> `:e.h}
|
|
77
79
|
<input
|
|
80
|
+
aria-describedby=${n.t(this.describedBy)}
|
|
81
|
+
aria-invalid=${this.hasError}
|
|
82
|
+
aria-errormessage=${n.t(this.errorMessageId)}
|
|
78
83
|
class=${t.t(this.inputClasses)}
|
|
79
84
|
.type=${this.inputType}
|
|
80
85
|
id="${this.id}-input"
|
|
@@ -99,6 +104,9 @@ const e=require("./element-DRc10X2R.cjs"),t=require("./class-map-BEib48YL.cjs"),
|
|
|
99
104
|
</div>
|
|
100
105
|
${this.showRangeLabels?e.h:e._` <div class="pkt-input-separator">–</div> `}
|
|
101
106
|
<input
|
|
107
|
+
aria-describedby=${n.t(this.describedBy)}
|
|
108
|
+
aria-invalid=${this.hasError}
|
|
109
|
+
aria-errormessage=${n.t(this.errorMessageId)}
|
|
102
110
|
class=${t.t(this.inputClasses)}
|
|
103
111
|
.type=${this.inputType}
|
|
104
112
|
id="${this.id}-to"
|
|
@@ -123,6 +131,9 @@ const e=require("./element-DRc10X2R.cjs"),t=require("./class-map-BEib48YL.cjs"),
|
|
|
123
131
|
`}};e.n([e.u({type:Array})],N.prototype,`value`,void 0),e.n([e.u({type:String})],N.prototype,`label`,void 0),e.n([e.u({type:Boolean})],N.prototype,`showRangeLabels`,void 0);try{e.d(`pkt-datepicker-range`)(N)}catch{console.warn(`Forsøker å definere <pkt-datepicker-range>, men den er allerede definert`)}var P=class extends j{constructor(...e){super(...e),this.value=[]}get isInputDisabled(){return this.disabled||this.maxlength!==void 0&&this.maxlength!==null&&this.value.length>=this.maxlength}dispatchAddToSelected(e){this.dispatchEvent(new CustomEvent(`add-to-selected`,{detail:e,bubbles:!0,composed:!0}))}render(){return e._`
|
|
124
132
|
<div class="pkt-input__container">
|
|
125
133
|
<input
|
|
134
|
+
aria-describedby=${n.t(this.describedBy)}
|
|
135
|
+
aria-invalid=${this.hasError}
|
|
136
|
+
aria-errormessage=${n.t(this.errorMessageId)}
|
|
126
137
|
class=${t.t(this.inputClasses)}
|
|
127
138
|
.type=${this.inputType}
|
|
128
139
|
id="${this.id}-input"
|
|
@@ -142,7 +153,7 @@ const e=require("./element-DRc10X2R.cjs"),t=require("./class-map-BEib48YL.cjs"),
|
|
|
142
153
|
/>
|
|
143
154
|
${this.renderCalendarButton()}
|
|
144
155
|
</div>
|
|
145
|
-
`}};e.n([e.u({type:Array})],P.prototype,`value`,void 0),e.n([e.u({type:Number})],P.prototype,`maxlength`,void 0);try{e.d(`pkt-datepicker-multiple`)(P)}catch{console.warn(`Forsøker å definere <pkt-datepicker-multiple>, men den er allerede definert`)}var F=class extends c.t{constructor(...e){super(...e),this._valueProperty=``,this.
|
|
156
|
+
`}};e.n([e.u({type:Array})],P.prototype,`value`,void 0),e.n([e.u({type:Number})],P.prototype,`maxlength`,void 0);try{e.d(`pkt-datepicker-multiple`)(P)}catch{console.warn(`Forsøker å definere <pkt-datepicker-multiple>, men den er allerede definert`)}var F=class t extends c.t{constructor(...e){super(...e),this._valueProperty=``,this.datepickerPopupRef=i.t(),this._value=[],this.label=`Datovelger`,this.dateformat=u.props.dateformat.default,this.multiple=u.props.multiple.default,this.maxlength=null,this.range=u.props.range.default,this.showRangeLabels=!1,this.min=null,this.max=null,this.weeknumbers=u.props.weeknumbers.default,this.withcontrols=u.props.withcontrols.default,this.excludedates=[],this.excludeweekdays=[],this.currentmonth=null,this.today=null,this.calendarOpen=!1,this.timezone=`Europe/Oslo`,this.inputClasses={},this.calRef=i.t(),this.popupRef=i.t(),this.singleInputRef=i.t(),this.rangeInputRef=i.t(),this.multipleInputRef=i.t(),this.addToSelected=e=>{let t=this.datepickerPopupRef.value;return t&&typeof t.addToSelected==`function`?t.addToSelected(e,this.min,this.max):E.addToSelected(e,this.calRef,this.min,this.max)}}get value(){return this._valueProperty}set value(e){let t=this._valueProperty,n=Array.isArray(e)?e.join(`,`):e||``;n!==t&&(this._valueProperty=n,this.requestUpdate(`value`,t))}get inputType(){return w.getInputType()}connectedCallback(){super.connectedCallback(),this.timezone&&this.timezone!==window.pktTz&&(window.pktTz=this.timezone)}disconnectedCallback(){super.disconnectedCallback()}onInput(){this.dispatchEvent(new Event(`input`,{bubbles:!0}))}valueChanged(e,t){e!==t&&(this.value=e??``,this.deriveValue(t))}deriveValue(e){let t=a.r(this._valueProperty),n=this.multiple&&t.length>1?C.filterSelectableDates(t,this.min,this.max,this.excludedates,this.excludeweekdays):t;if(this.range&&!C.validateRangeOrder(n)){this._valueProperty=``,super.valueChanged(``,e),this._value=[];return}this._valueProperty=a.n(n),this.range&&n.length===1||super.valueChanged(this._valueProperty,e),this._value=n}attributeChangedCallback(e,t,n){e===`excludedates`&&typeof this.excludedates==`string`&&(this.excludedates=a.r(n||``)),e===`excludeweekdays`&&typeof this.excludeweekdays==`string`&&(this.excludeweekdays=a.r(n||``)),super.attributeChangedCallback(e,t,n)}static{this.DERIVED_FROM=[`value`,`multiple`,`range`,`min`,`max`,`excludedates`,`excludeweekdays`]}willUpdate(e){if(super.willUpdate(e),t.DERIVED_FROM.some(t=>e.has(t))){let t=e.get(`value`);this.deriveValue(Array.isArray(t)?t.join(`,`):t??null)}}updated(e){this.classList.add(`pkt-datepicker`),this.classList.toggle(`pkt-datepicker--fullwidth`,this.fullwidth),this.classList.toggle(`pkt-datepicker--medium`,this.inputSize===`medium`),this.classList.toggle(`pkt-datepicker--small`,this.inputSize===`small`),this.classList.toggle(`pkt-datepicker--xsmall`,this.inputSize===`xsmall`),super.updated(e)}get inputRef(){return{value:this.currentInputElement}}get inputRefTo(){return{value:this.currentInputElementTo}}get currentInputElement(){return this.multiple?this.multipleInputRef.value?.inputElement:this.range?this.rangeInputRef.value?.inputElement:this.singleInputRef.value?.inputElement}get currentInputElementTo(){if(this.range)return this.rangeInputRef.value?.inputElementTo}get currentButtonElement(){return this.multiple?this.multipleInputRef.value?.buttonElement:this.range?this.rangeInputRef.value?.buttonElement:this.singleInputRef.value?.buttonElement}get btnRef(){return{value:this.currentButtonElement}}renderInput(){return e._`
|
|
146
157
|
<pkt-datepicker-single
|
|
147
158
|
.value=${this._value[0]??``}
|
|
148
159
|
.inputType=${this.inputType}
|
|
@@ -155,6 +166,8 @@ const e=require("./element-DRc10X2R.cjs"),t=require("./class-map-BEib48YL.cjs"),
|
|
|
155
166
|
.inputClasses=${this.inputClasses}
|
|
156
167
|
.inputSize=${this.inputSize}
|
|
157
168
|
.internals=${this.internals}
|
|
169
|
+
.hasError=${this.hasError}
|
|
170
|
+
.hasHelptext=${!!(this.helptext||this.helptextDropdown)}
|
|
158
171
|
.strings=${this.strings}
|
|
159
172
|
@toggle-calendar=${e=>this.toggleCalendar(e.detail)}
|
|
160
173
|
@input-change=${()=>this.onInput()}
|
|
@@ -180,6 +193,8 @@ const e=require("./element-DRc10X2R.cjs"),t=require("./class-map-BEib48YL.cjs"),
|
|
|
180
193
|
.inputClasses=${this.inputClasses}
|
|
181
194
|
.inputSize=${this.inputSize}
|
|
182
195
|
.internals=${this.internals}
|
|
196
|
+
.hasError=${this.hasError}
|
|
197
|
+
.hasHelptext=${!!(this.helptext||this.helptextDropdown)}
|
|
183
198
|
.strings=${this.strings}
|
|
184
199
|
@toggle-calendar=${e=>this.toggleCalendar(e.detail)}
|
|
185
200
|
@input-change=${()=>this.onInput()}
|
|
@@ -206,6 +221,8 @@ const e=require("./element-DRc10X2R.cjs"),t=require("./class-map-BEib48YL.cjs"),
|
|
|
206
221
|
.inputClasses=${this.inputClasses}
|
|
207
222
|
.inputSize=${this.inputSize}
|
|
208
223
|
.internals=${this.internals}
|
|
224
|
+
.hasError=${this.hasError}
|
|
225
|
+
.hasHelptext=${!!(this.helptext||this.helptextDropdown)}
|
|
209
226
|
.strings=${this.strings}
|
|
210
227
|
@toggle-calendar=${e=>this.toggleCalendar(e.detail)}
|
|
211
228
|
@input-change=${()=>this.onInput()}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require("./element-DRc10X2R.cjs"),t=require("./class-map-BEib48YL.cjs"),n=require("./if-defined-BeVQnl3C.cjs"),r=require("./element-with-slot-DgtT8lCH.cjs");require("./icon-DBFTFd-J.cjs"),require("./button-CIb0IxTg.cjs");const i=require("./ref-BkV4Cd8U.cjs"),a=require("./booleanish-BF8l4scU.cjs"),o=require("./fetch-header-footer-data-CUKV0biS.cjs"),s=require("./focus-trap-DSv4Ifqm.cjs"),c=require("./scroll-lock-BN8lOhV5.cjs");require("./link-BWAhHUku.cjs"),require("./textinput-
|
|
1
|
+
const e=require("./element-DRc10X2R.cjs"),t=require("./class-map-BEib48YL.cjs"),n=require("./if-defined-BeVQnl3C.cjs"),r=require("./element-with-slot-DgtT8lCH.cjs");require("./icon-DBFTFd-J.cjs"),require("./button-CIb0IxTg.cjs");const i=require("./ref-BkV4Cd8U.cjs"),a=require("./booleanish-BF8l4scU.cjs"),o=require("./fetch-header-footer-data-CUKV0biS.cjs"),s=require("./focus-trap-DSv4Ifqm.cjs"),c=require("./scroll-lock-BN8lOhV5.cjs");require("./link-BWAhHUku.cjs"),require("./textinput-THsTffFY.cjs"),require("./searchinput-CiPB8xvh.cjs"),require("./header-menu-wcnhBSzs.cjs");var l=e=>typeof e.target==`string`?{title:e.title,iconName:e.iconName,href:e.target}:{title:e.title,iconName:e.iconName,onClick:e.target},u=e=>l(e),d=e=>{if(!e)return;let t=typeof e==`string`?new Date(e):e;if(!isNaN(t.getTime()))return t.toLocaleDateString(`nb-NO`,{day:`numeric`,month:`long`,year:`numeric`,hour:`2-digit`,minute:`2-digit`})},f=class{constructor(e,t){this.isMobile=!1,this.isTablet=!1,this.isHidden=!1,this.pauseScrollHide=!1,this.componentWidth=typeof window<`u`?window.innerWidth:0,this.lastScrollPosition=0,this.scrollLockToken=c.t(),this.lastFocusedElement=null,this.shouldRestoreFocus=!1,this.handleScroll=()=>{if(this.getOptions().scrollBehavior!==`hide`||this.pauseScrollHide)return;let e=window.pageYOffset||document.documentElement.scrollTop;if(e<0||Math.abs(e-this.lastScrollPosition)<60)return;let t=e>this.lastScrollPosition;this.lastScrollPosition=e,t!==this.isHidden&&(this.isHidden=t,this.host.requestUpdate())},this.host=e,this.getOptions=t,e.addController(this)}hostConnected(){window.addEventListener(`scroll`,this.handleScroll)}hostDisconnected(){this.resizeObserver?.disconnect(),window.removeEventListener(`scroll`,this.handleScroll),c.n(this.scrollLockToken,!1)}observe(e){e&&(this.componentWidth=e.offsetWidth,this.refreshBreakpoints(),this.resizeObserver=new ResizeObserver(e=>{for(let t of e)this.componentWidth=t.borderBoxSize&&t.borderBoxSize.length>0?t.borderBoxSize[0].inlineSize:t.contentRect.width,this.refreshBreakpoints()}),this.resizeObserver.observe(e))}refreshBreakpoints(){let{mobileBreakpoint:e,tabletBreakpoint:t}=this.getOptions(),n=this.componentWidth<e,r=this.componentWidth<t;(n!==this.isMobile||r!==this.isTablet)&&(this.isMobile=n,this.isTablet=r,this.host.requestUpdate())}setScrollLock(e){c.n(this.scrollLockToken,e)}captureFocus(){this.lastFocusedElement=document.activeElement}flagRestoreFocus(){this.shouldRestoreFocus=!0}restoreFocus(){this.shouldRestoreFocus&&this.lastFocusedElement&&document.contains(this.lastFocusedElement)&&this.lastFocusedElement.focus(),this.lastFocusedElement=null,this.shouldRestoreFocus=!1}},p=class extends e.t{constructor(...e){super(...e),this.canChangeRepresentation=!1,this.logoutOnClick=!1}handleChangeRepresentation(){this.dispatchEvent(new CustomEvent(`change-representation`,{bubbles:!0,composed:!0}))}handleLogout(){this.dispatchEvent(new CustomEvent(`log-out`,{bubbles:!0,composed:!0}))}handleMenuItemClick(e){`onClick`in e&&typeof e.onClick==`function`&&e.onClick()}renderLinkOrButton(n,r){let i=`href`in n,a=t.t({"pkt-user-menu__link":!0,"pkt-link-button":!i,"pkt-link":!i,"pkt-link--icon-left":!i,[r||``]:!!r});return i?e._`
|
|
2
2
|
<pkt-link
|
|
3
3
|
icon-name=${n.iconName||e.h}
|
|
4
4
|
href=${n.href}
|
|
@@ -10,7 +10,7 @@ import { n as m, o as h, t as g } from "./fetch-header-footer-data-Pc32etrk.js";
|
|
|
10
10
|
import { n as _, t as v } from "./focus-trap-DG3pEuyJ.js";
|
|
11
11
|
import { n as y, t as b } from "./scroll-lock-DAbNKAUy.js";
|
|
12
12
|
import "./link-BvjWWWlc.js";
|
|
13
|
-
import "./textinput-
|
|
13
|
+
import "./textinput-kp1242Ci.js";
|
|
14
14
|
import "./searchinput-DrUcPajl.js";
|
|
15
15
|
import "./header-menu-DKAcUFzh.js";
|
|
16
16
|
//#region ../../shared-types/header.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./element-DRc10X2R.cjs"),t=require("./format-B8meU8Tm.cjs"),n=require("./element-with-slot-DgtT8lCH.cjs"),r=require("./utils-63cRpWut.cjs"),i=require("./booleanish-BF8l4scU.cjs");var a=new WeakMap,o=new WeakMap,s=new WeakMap,c=new WeakMap,l=new WeakMap,u=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,h=new WeakMap,g=new WeakMap,_=new WeakMap,v=new WeakMap,y=new WeakMap,b=(e,t,n)=>{e.getAttribute(t)!==n&&e.setAttribute(t,n)},x=(e,t)=>{e.toggleAttribute(`internals-disabled`,t),t?b(e,`aria-disabled`,`true`):e.removeAttribute(`aria-disabled`),e.formDisabledCallback&&e.formDisabledCallback.apply(e,[t])},S=e=>{s.get(e).forEach(e=>{e.remove()}),s.set(e,[])},C=(e,t)=>{let n=document.createElement(`input`);return n.type=`hidden`,n.name=e.getAttribute(`name`),e.after(n),s.get(t).push(n),n},w=(e,t)=>{if(t.length){let n=Array.from(t);n.forEach(t=>t.addEventListener(`click`,e.click.bind(e)));let[r]=n,i=r.id;r.id||=(i=`${r.htmlFor}_Label`,i),b(e,`aria-labelledby`,i)}},T=e=>{let t=Array.from(e.elements).filter(e=>!e.tagName.includes(`-`)&&e.validity).map(e=>e.validity.valid),n=f.get(e)||[],r=Array.from(n).filter(e=>e.isConnected).map(e=>c.get(e).validity.valid),i=[...t,...r].includes(!1);e.toggleAttribute(`internals-invalid`,i),e.toggleAttribute(`internals-valid`,!i)},ee=e=>{T(O(e.target))},E=e=>{T(O(e.target))},te=e=>{let t=[`button[type=submit]`,`input[type=submit]`,`button:not([type])`].map(e=>`${e}:not([disabled])`).map(t=>`${t}:not([form])${e.id?`,${t}[form='${e.id}']`:``}`).join(`,`);e.addEventListener(`click`,n=>{if(n.target.closest(t)){let t=f.get(e);if(e.noValidate)return;t.size&&Array.from(t).reverse().map(e=>c.get(e).reportValidity()).includes(!1)&&n.preventDefault()}})},ne=e=>{let t=f.get(e.target);t&&t.size&&t.forEach(e=>{e.constructor.formAssociated&&e.formResetCallback&&e.formResetCallback.apply(e)})},D=(e,t,n)=>{if(t){let r=f.get(t);if(r)r.add(e);else{let n=new Set;n.add(e),f.set(t,n),te(t),t.addEventListener(`reset`,ne),t.addEventListener(`input`,ee),t.addEventListener(`change`,E)}u.set(t,{ref:e,internals:n}),e.constructor.formAssociated&&e.formAssociatedCallback&&setTimeout(()=>{e.formAssociatedCallback.apply(e,[t])},0),T(t)}},O=e=>{let t=e.parentNode;return t&&t.tagName!==`FORM`&&(t=O(t)),t},k=(e,t,n=DOMException)=>{if(!e.constructor.formAssociated)throw new n(t)},A=(e,t,n)=>{let r=f.get(e);return r&&r.size&&r.forEach(e=>{c.get(e)[n]()||(t=!1)}),t},j=e=>{let t=!1;if(e.constructor.formAssociated){let n=c.get(e);n===void 0&&(e.attachInternals(),n=c.get(e),t=!0);let{labels:r,form:i}=n;w(e,r),D(e,i,n)}return t};function M(){return typeof MutationObserver<`u`}var N={ariaAtomic:`aria-atomic`,ariaAutoComplete:`aria-autocomplete`,ariaBrailleLabel:`aria-braillelabel`,ariaBrailleRoleDescription:`aria-brailleroledescription`,ariaBusy:`aria-busy`,ariaChecked:`aria-checked`,ariaColCount:`aria-colcount`,ariaColIndex:`aria-colindex`,ariaColIndexText:`aria-colindextext`,ariaColSpan:`aria-colspan`,ariaCurrent:`aria-current`,ariaDescription:`aria-description`,ariaDisabled:`aria-disabled`,ariaExpanded:`aria-expanded`,ariaHasPopup:`aria-haspopup`,ariaHidden:`aria-hidden`,ariaInvalid:`aria-invalid`,ariaKeyShortcuts:`aria-keyshortcuts`,ariaLabel:`aria-label`,ariaLevel:`aria-level`,ariaLive:`aria-live`,ariaModal:`aria-modal`,ariaMultiLine:`aria-multiline`,ariaMultiSelectable:`aria-multiselectable`,ariaOrientation:`aria-orientation`,ariaPlaceholder:`aria-placeholder`,ariaPosInSet:`aria-posinset`,ariaPressed:`aria-pressed`,ariaReadOnly:`aria-readonly`,ariaRelevant:`aria-relevant`,ariaRequired:`aria-required`,ariaRoleDescription:`aria-roledescription`,ariaRowCount:`aria-rowcount`,ariaRowIndex:`aria-rowindex`,ariaRowIndexText:`aria-rowindextext`,ariaRowSpan:`aria-rowspan`,ariaSelected:`aria-selected`,ariaSetSize:`aria-setsize`,ariaSort:`aria-sort`,ariaValueMax:`aria-valuemax`,ariaValueMin:`aria-valuemin`,ariaValueNow:`aria-valuenow`,ariaValueText:`aria-valuetext`,role:`role`},P=(e,t)=>{for(let n in N){t[n]=null;let r=null,i=N[n];Object.defineProperty(t,n,{get(){return r},set(n){r=n,e.isConnected?b(e,i,n):m.set(e,t)}})}},re=(e,t)=>{s.set(t,[]),R.observe?.(e,L)};function F(e){let t=c.get(e),{form:n}=t;D(e,n,t),w(e,t.labels)}var I=(e,t=!1)=>{let n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(e){return c.has(e)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}}),r=n.nextNode(),i=!t||e.disabled;for(;r;)r.formDisabledCallback&&i&&x(r,e.disabled),r=n.nextNode()},L={attributes:!0,attributeFilter:[`disabled`,`name`]},R=M()?new MutationObserver(e=>{for(let t of e){let e=t.target;if(t.attributeName===`disabled`&&(e.constructor.formAssociated?x(e,e.hasAttribute(`disabled`)):e.localName===`fieldset`&&I(e)),t.attributeName===`name`&&e.constructor.formAssociated){let t=c.get(e),n=p.get(e);t.setFormValue(n)}}}):{};function z(e){e.forEach(e=>{let{addedNodes:t,removedNodes:n}=e,r=Array.from(t),i=Array.from(n);r.forEach(e=>{if(c.has(e)&&e.constructor.formAssociated&&F(e),m.has(e)){let t=m.get(e);Object.keys(N).filter(e=>t[e]!==null).forEach(n=>{b(e,N[n],t[n])}),m.delete(e)}if(y.has(e)){let t=y.get(e);b(e,`internals-valid`,t.validity.valid.toString()),b(e,`internals-invalid`,(!t.validity.valid).toString()),b(e,`aria-invalid`,(!t.validity.valid).toString()),y.delete(e)}if(e.localName===`form`){let t=f.get(e),n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(e){return c.has(e)&&e.constructor.formAssociated&&!(t&&t.has(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}}),r=n.nextNode();for(;r;)F(r),r=n.nextNode()}e.localName===`fieldset`&&(R.observe?.(e,L),I(e,!0))}),i.forEach(e=>{let t=c.get(e);t&&s.get(t)&&S(t),d.has(e)&&d.get(e).disconnect()})})}function ie(e){e.forEach(e=>{let{removedNodes:t}=e;t.forEach(t=>{let n=_.get(e.target);c.has(t)&&j(t),n.disconnect()})})}var ae=e=>{let t=new MutationObserver(ie);window?.ShadyDOM?.inUse&&e.mode&&e.host&&(e=e.host),t.observe?.(e,{childList:!0}),_.set(e,t)};M()&&new MutationObserver(z);var B={childList:!0,subtree:!0},oe=class{constructor(){this.badInput=!1,this.customError=!1,this.patternMismatch=!1,this.rangeOverflow=!1,this.rangeUnderflow=!1,this.stepMismatch=!1,this.tooLong=!1,this.tooShort=!1,this.typeMismatch=!1,this.valid=!0,this.valueMissing=!1,Object.seal(this)}},se=e=>(e.badInput=!1,e.customError=!1,e.patternMismatch=!1,e.rangeOverflow=!1,e.rangeUnderflow=!1,e.stepMismatch=!1,e.tooLong=!1,e.tooShort=!1,e.typeMismatch=!1,e.valid=!0,e.valueMissing=!1,e),ce=(e,t,n)=>(e.valid=le(t),Object.keys(t).forEach(n=>e[n]=t[n]),n&&T(n),e),le=e=>{let t=!0;for(let n in e)n!==`valid`&&e[n]!==!1&&(t=!1);return t},V=new WeakMap;function H(e,t){e.toggleAttribute(t,!0),e.part&&e.part.add(t)}var U=class extends Set{static get isPolyfilled(){return!0}constructor(e){if(super(),!e||!e.tagName||e.tagName.indexOf(`-`)===-1)throw TypeError(`Illegal constructor`);V.set(this,e)}add(e){if(!/^--/.test(e)||typeof e!=`string`)throw new DOMException(`Failed to execute 'add' on 'CustomStateSet': The specified value ${e} must start with '--'.`);let t=super.add(e),n=V.get(this),r=`state${e}`;return n.isConnected?H(n,r):setTimeout(()=>{H(n,r)}),t}clear(){for(let[e]of this.entries())this.delete(e);super.clear()}delete(e){let t=super.delete(e),n=V.get(this);return n.isConnected?(n.toggleAttribute(`state${e}`,!1),n.part&&n.part.remove(`state${e}`)):setTimeout(()=>{n.toggleAttribute(`state${e}`,!1),n.part&&n.part.remove(`state${e}`)}),t}},ue=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},W=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},G,de=class{constructor(e){G.set(this,void 0),ue(this,G,e,`f`);for(let t=0;t<e.length;t++){let n=e[t];this[t]=n,n.hasAttribute(`name`)&&(this[n.getAttribute(`name`)]=n)}Object.freeze(this)}get length(){return W(this,G,`f`).length}[(G=new WeakMap,Symbol.iterator)](){return W(this,G,`f`)[Symbol.iterator]()}item(e){return this[e]==null?null:this[e]}namedItem(e){return this[e]==null?null:this[e]}};function fe(){let e=HTMLFormElement.prototype.checkValidity;HTMLFormElement.prototype.checkValidity=n;let t=HTMLFormElement.prototype.reportValidity;HTMLFormElement.prototype.reportValidity=r;function n(...t){let n=e.apply(this,t);return A(this,n,`checkValidity`)}function r(...e){let n=t.apply(this,e);return A(this,n,`reportValidity`)}let{get:i}=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,`elements`);Object.defineProperty(HTMLFormElement.prototype,"elements",{get(...e){let t=i.call(this,...e),n=Array.from(f.get(this)||[]);return n.length===0?t:new de(Array.from(t).concat(n).sort((e,t)=>e.compareDocumentPosition?e.compareDocumentPosition(t)&2?1:-1:0))}})}var K=class{static get isPolyfilled(){return!0}constructor(e){if(!e||!e.tagName||e.tagName.indexOf(`-`)===-1)throw TypeError(`Illegal constructor`);let t=e.getRootNode(),n=new oe;this.states=new U(e),a.set(this,e),o.set(this,n),c.set(e,this),P(e,this),re(e,this),Object.seal(this),t instanceof DocumentFragment&&ae(t)}checkValidity(){let e=a.get(this);if(k(e,`Failed to execute 'checkValidity' on 'ElementInternals': The target element is not a form-associated custom element.`),!this.willValidate)return!0;let t=o.get(this);if(!t.valid){let t=new Event(`invalid`,{bubbles:!1,cancelable:!0,composed:!1});e.dispatchEvent(t)}return t.valid}get form(){let e=a.get(this);k(e,`Failed to read the 'form' property from 'ElementInternals': The target element is not a form-associated custom element.`);let t;return e.constructor.formAssociated===!0&&(t=O(e)),t}get labels(){let e=a.get(this);k(e,`Failed to read the 'labels' property from 'ElementInternals': The target element is not a form-associated custom element.`);let t=e.getAttribute(`id`),n=e.getRootNode();return n&&t?n.querySelectorAll(`[for="${t}"]`):[]}reportValidity(){let e=a.get(this);if(k(e,`Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.`),!this.willValidate)return!0;let t=this.checkValidity(),n=g.get(this);if(n&&!e.constructor.formAssociated)throw new DOMException(`Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.`);return!t&&n&&(e.focus(),n.focus()),t}setFormValue(e){let t=a.get(this);if(k(t,`Failed to execute 'setFormValue' on 'ElementInternals': The target element is not a form-associated custom element.`),S(this),e!=null&&!(e instanceof FormData)){if(t.getAttribute(`name`)){let n=C(t,this);n.value=e}}else e!=null&&e instanceof FormData&&Array.from(e).reverse().forEach(([e,n])=>{if(typeof n==`string`){let r=C(t,this);r.name=e,r.value=n}});p.set(t,e)}setValidity(e,t,n){let r=a.get(this);if(k(r,`Failed to execute 'setValidity' on 'ElementInternals': The target element is not a form-associated custom element.`),!e)throw TypeError(`Failed to execute 'setValidity' on 'ElementInternals': 1 argument required, but only 0 present.`);g.set(this,n);let i=o.get(this),s={};for(let t in e)s[t]=e[t];Object.keys(s).length===0&&se(i);let c={...i,...s};delete c.valid;let{valid:u}=ce(i,c,this.form);if(!u&&!t)throw new DOMException(`Failed to execute 'setValidity' on 'ElementInternals': The second argument should not be empty if one or more flags in the first argument are true.`);l.set(this,u?``:t),r.isConnected?(r.toggleAttribute(`internals-invalid`,!u),r.toggleAttribute(`internals-valid`,u),b(r,`aria-invalid`,`${!u}`)):y.set(r,this)}get shadowRoot(){let e=a.get(this);return h.get(e)||null}get validationMessage(){return k(a.get(this),`Failed to read the 'validationMessage' property from 'ElementInternals': The target element is not a form-associated custom element.`),l.get(this)}get validity(){return k(a.get(this),`Failed to read the 'validity' property from 'ElementInternals': The target element is not a form-associated custom element.`),o.get(this)}get willValidate(){let e=a.get(this);return k(e,`Failed to read the 'willValidate' property from 'ElementInternals': The target element is not a form-associated custom element.`),!(e.matches(`:disabled`)||e.disabled||e.hasAttribute(`disabled`)||e.hasAttribute(`readonly`))}};function pe(){if(typeof window>`u`||!window.ElementInternals||!HTMLElement.prototype.attachInternals)return!1;class e extends HTMLElement{constructor(){super(),this.internals=this.attachInternals()}}let t=`element-internals-feature-detection-${Math.random().toString(36).replace(/[^a-z]+/g,``)}`;customElements.define(t,e);let n=new e;return[`shadowRoot`,`form`,`willValidate`,`validity`,`validationMessage`,`labels`,`setFormValue`,`setValidity`,`checkValidity`,`reportValidity`].every(e=>e in n.internals)}var q=!1,J=!1;function Y(e){J||(J=!0,window.CustomStateSet=U,e&&(HTMLElement.prototype.attachInternals=function(...t){let n=e.call(this,t);return n.states=new U(this),n}))}function me(e=!0){let t=!1;if(!q){if(q=!0,typeof window<`u`&&(window.ElementInternals=K),typeof CustomElementRegistry<`u`){let e=CustomElementRegistry.prototype.define;CustomElementRegistry.prototype.define=function(n,r,i){if(r.formAssociated){let e=r.prototype.connectedCallback;r.prototype.connectedCallback=function(){v.has(this)||(v.set(this,!0),this.hasAttribute(`disabled`)&&x(this,!0)),e?.apply(this),t=j(this)}}e.call(this,n,r,i)}}if(typeof HTMLElement<`u`&&(HTMLElement.prototype.attachInternals=function(){if(!this.tagName)return{};if(this.tagName.indexOf(`-`)===-1)throw Error(`Failed to execute 'attachInternals' on 'HTMLElement': Unable to attach ElementInternals to non-custom elements.`);if(c.has(this)&&!t)throw new DOMException(`DOMException: Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.`);return new K(this)}),typeof Element<`u`){function n(...t){let n=e.apply(this,t);if(h.set(this,n),M()){let e=new MutationObserver(z);window.ShadyDOM?e.observe(this,B):e.observe(n,B),d.set(this,e)}return n}let e=Element.prototype.attachShadow;Element.prototype.attachShadow=n}M()&&typeof document<`u`&&new MutationObserver(z).observe(document.documentElement,B),typeof HTMLFormElement<`u`&&fe(),(e||typeof window<`u`&&!window.CustomStateSet)&&Y()}}customElements.polyfillWrapFlushCallback||(pe()?typeof window<`u`&&!window.CustomStateSet&&Y(HTMLElement.prototype.attachInternals):me(!1));var X=`on`,Z=`--checked`,Q=`,`,$=class extends n.t{static get formAssociated(){return!0}get ariaDescribedBy(){return this.ariaDescribedby}set ariaDescribedBy(e){this.ariaDescribedby=e}effectiveCounter(e){return this.counter??e}effectiveHasFieldset(e){return this.hasFieldset??e}constructor(){super(),this.defaultValue=null,this.disabled=!1,this.readonly=!1,this.required=!1,this.max=null,this.maxlength=null,this.min=null,this.minlength=null,this.step=null,this.ariaDescribedby=null,this.ariaLabelledby=null,this.name=``,this.pattern=null,this.placeholder=null,this.id=r.n(),this.counter=null,this.hasError=!1,this.inline=!1,this.hasFieldset=null,this.optionalTag=!1,this.requiredTag=!1,this.skipForwardTestid=!1,this.useWrapper=!0,this.fullwidth=!1,this.counterMaxLength=0,this.errorMessage=``,this.helptext=``,this.helptextDropdown=``,this.helptextDropdownButton=null,this.label=null,this.tagText=null,this.inputSize=`medium`,this.dataTestid=``,this.touched=!1,this._initialized=!1,this._didInitDerivedState=!1,this.internals=this.attachInternals()}manageValidity(e){if(!e){console.warn(`manageValidity called without valid input element`);return}let n=this.pktStrings.get(`validation`);this.required&&!this.value?this.internals.setValidity({valueMissing:!0},n.valueMissing,e):e.validity?.typeMismatch||e.validity?.badInput?this.internals.setValidity({typeMismatch:!0},n.typeMismatch,e):e.validity?.patternMismatch?this.internals.setValidity({patternMismatch:!0},n.patternMismatch,e):e.validity?.tooShort||this.minlength&&this.minlength>0&&this.value.length<this.minlength?this.internals.setValidity({tooShort:!0},n.tooShort,e):e.validity?.tooLong||this.maxlength&&this.maxlength>0&&this.value.length>this.maxlength?this.internals.setValidity({tooLong:!0},n.tooLong,e):e.validity?.rangeUnderflow?this.internals.setValidity({rangeUnderflow:!0},this.min?t.t(n.rangeUnderflowMin,{min:this.min.toString()}):n.rangeUnderflow,e):e.validity?.stepMismatch?this.internals.setValidity({stepMismatch:!0},n.typeMismatch,e):e.validity?.rangeOverflow?this.internals.setValidity({rangeOverflow:!0},this.max?t.t(n.rangeOverflowMax,{max:this.max.toString()}):n.rangeOverflow,e):e.validity?.customError?this.internals.setValidity({customError:!0},e.validationMessage,e):this.internals.setValidity({})}setFormValue(e){if(this.internals){if(Array.isArray(e)){let t=new FormData;e.forEach(e=>{t.append(this.name,e)}),this.internals.setFormValue(t)}else this.internals.setFormValue(e)}}coordinateRadioGroup(){if(!this.form||!this.name||this.type!==`radio`)return;let e=`pkt-radiobutton[name="${this.name}"], input[type=radio][name="${this.name}"]`;this.form.querySelectorAll(e).forEach(e=>{if(e!==this&&e.getAttribute(`name`)===this.name&&e.getAttribute(`value`)!==this.value){let t=e;t.checked&&(t.checked=!1,t.internals&&(t.internals.setFormValue(null),t.internals.states?.delete(Z)))}})}valueChecked(e){if(!this.touched)return;let t=this.internals.form||this.closest(`form`),n=t?new FormData(t):null;if(this.type===`radio`&&this.coordinateRadioGroup(),typeof e==`string`?(this.checked=e===`true`,this.internals.ariaChecked=String(e===`true`)):typeof e==`boolean`&&(this.checked=e,this.internals.ariaChecked=String(e)),this.checked){let e=(typeof this.value==`string`?this.value:``)||X;this.internals.setFormValue(e),n&&n.append(this.name,e),this.internals.states.add(Z)}else this.internals.setFormValue(null),n&&n.delete(this.name),this.internals.states.delete(Z);this.dispatchChangeEvents(this.checked),this.internals.reportValidity()}valueChanged(e,t){let n=e;if(typeof n==`number`||typeof n==`boolean`)e=String(n);else if(n!=null&&typeof n!=`string`&&!Array.isArray(n)){let e=typeof n==`object`?n?.constructor?.name??`object`:typeof n;console.warn(`${this.localName}: value må være en streng eller et tall, men fikk ${e}. Verdien ignoreres. For dato-/tidsfelt, send en ISO-formatert streng (f.eks. "2026-07-09" eller "13:45").`)}(t!==this.value||t!==this._value)&&(typeof e==`string`?((this.multiple||this.range)&&e.includes(Q)&&(e=e.split(Q)),this.value=e,this._value=Array.isArray(e)?e:[e]):Array.isArray(e)?(this.value=this.multiple||this.range?e:e[0],this._value=e):(this.value=``,this._value=[]),(!this.value||this.value.length===0)&&t&&t.length!==0?this.clearInputValue():this.value&&this.value.toString()!==t?.toString()&&this.onChange(this.value))}dispatchChangeEvents(e){this.dispatchEvent(new Event(`change`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`value-change`,{detail:e,bubbles:!0,composed:!0}))}clearInputValue(){let e=this.multiple||this.range?[]:``;this.value=e,this.setFormValue(e),this.dispatchChangeEvents(e)}onFocus(){this.dispatchEvent(new FocusEvent(`focus`,{bubbles:!0,composed:!0}))}onBlur(){this.dispatchEvent(new FocusEvent(`blur`,{bubbles:!0,composed:!0}))}onInput(){this.dispatchEvent(new InputEvent(`input`,{bubbles:!0,composed:!0}))}normalizeValue(e){return(this.range||this.multiple)&&typeof e==`string`&&e.includes(Q)?e.split(Q):!this.multiple&&!this.range&&Array.isArray(e)?e[0]||``:e}validate(){this.inputRef?.value&&this.manageValidity(this.inputRef.value),this.inputRefTo?.value&&this.manageValidity(this.inputRefTo.value)}onChange(e){if(this.touched=!0,typeof e!=`string`&&!Array.isArray(e))return;let t=this.normalizeValue(e);this.setFormValue(t),this.validate(),this._initialized&&this.dispatchChangeEvents(t)}formResetCallback(){if(this.touched=!1,this._options&&this._options.length&&this._options.forEach(e=>{`selected`in e&&(e.selected=!1)}),this.checked!==void 0)this.checked=!1,this.internals.ariaChecked=`false`,this.internals.setFormValue(``),this.inputRef?.value&&`checked`in this.inputRef.value&&(this.inputRef.value.checked=!1),this.valueChecked(this.checked);else{this.internals.setFormValue(``);let e=this.defaultValue||(this.multiple||this.range?[]:``);this.value=e,this._value=Array.isArray(e)?e:[e],this.valueChanged(this.value,null)}this.internals.ariaInvalid=`false`}updated(e){super.updated(e),e.has(`dataTestid`)&&this.dataTestid&&this.inputRef.value&&(this.skipForwardTestid?this.hasAttribute(`data-testid`)||this.setAttribute(`data-testid`,this.dataTestid):(this.inputRef.value.dataset.testid=this.dataTestid,this.removeAttribute(`data-testid`)))}willUpdate(e){super.willUpdate(e),!this._didInitDerivedState&&(this._didInitDerivedState=!0,this.form||=this.internals.form||this.closest(`form`),this.defaultChecked&&(this.checked=!0),this.id&&!this.name&&(this.name=this.id))}firstUpdated(e){if(super.firstUpdated(e),this.value&&this.defaultValue===null&&(this.defaultValue=this.value),this.defaultValue!==null&&!this.value&&this.valueChanged(this.defaultValue,null),this.defaultChecked&&(this.internals.ariaChecked=`true`),this.required&&(this.internals.ariaRequired=`true`),this.disabled&&(this.internals.ariaDisabled=`true`),this.checked!==void 0){let e=this.checked===``||this.checked===`true`||this.checked===!0;this.internals.ariaChecked=String(e);let t=e?(typeof this.value==`string`?this.value:``)||X:null;this.internals.setFormValue(t)}else this.setFormValue(this.value);this.inputRef&&this.inputRef.value&&(this.inputRef.value.setAttribute(`form`,``),this.manageValidity(this.inputRef.value)),this.inputRefTo&&this.inputRefTo.value&&(this.inputRefTo.value.setAttribute(`form`,``),this.manageValidity(this.inputRefTo.value)),this.updateComplete.then(()=>{this._initialized=!0})}};e.n([e.u({type:Boolean,reflect:!0})],$.prototype,`checked`,void 0),e.n([e.u({type:Boolean})],$.prototype,`defaultChecked`,void 0),e.n([e.u({type:Boolean})],$.prototype,`multiple`,void 0),e.n([e.u({type:Boolean})],$.prototype,`range`,void 0),e.n([e.u({type:String,reflect:!0})],$.prototype,`type`,void 0),e.n([e.u({hasChanged:()=>!1})],$.prototype,`defaultValue`,void 0),e.n([e.u({type:Boolean,reflect:!0})],$.prototype,`disabled`,void 0),e.n([e.u({type:Boolean,reflect:!0})],$.prototype,`readonly`,void 0),e.n([e.u({type:Boolean,reflect:!0})],$.prototype,`required`,void 0),e.n([e.u({reflect:!0,converter:{fromAttribute:e=>e,toAttribute:e=>e?.toString()??null}})],$.prototype,`max`,void 0),e.n([e.u({type:Number,reflect:!0})],$.prototype,`maxlength`,void 0),e.n([e.u({reflect:!0,converter:{fromAttribute:e=>e,toAttribute:e=>e?.toString()??null}})],$.prototype,`min`,void 0),e.n([e.u({type:Number,reflect:!0})],$.prototype,`minlength`,void 0),e.n([e.u({type:Number,reflect:!0})],$.prototype,`step`,void 0),e.n([e.u({type:String,attribute:`aria-describedby`})],$.prototype,`ariaDescribedby`,void 0),e.n([e.u({type:String,attribute:`aria-labelledby`})],$.prototype,`ariaLabelledby`,void 0),e.n([e.u({type:String,reflect:!0})],$.prototype,`name`,void 0),e.n([e.u({type:String,reflect:!0})],$.prototype,`pattern`,void 0),e.n([e.u({type:String,reflect:!0})],$.prototype,`placeholder`,void 0),e.n([e.u({type:String,reflect:!0})],$.prototype,`id`,void 0),e.n([e.u({type:Boolean,converter:i.n})],$.prototype,`counter`,void 0),e.n([e.u({type:Boolean})],$.prototype,`hasError`,void 0),e.n([e.u({type:Boolean})],$.prototype,`inline`,void 0),e.n([e.u({type:Boolean,converter:i.n})],$.prototype,`hasFieldset`,void 0),e.n([e.u({type:Boolean})],$.prototype,`optionalTag`,void 0),e.n([e.u({type:Boolean})],$.prototype,`requiredTag`,void 0),e.n([e.u({type:Boolean})],$.prototype,`skipForwardTestid`,void 0),e.n([e.u({type:Boolean,reflect:!0,converter:i.t})],$.prototype,`useWrapper`,void 0),e.n([e.u({type:Boolean,reflect:!0})],$.prototype,`fullwidth`,void 0),e.n([e.u({type:Number})],$.prototype,`counterMaxLength`,void 0),e.n([e.u({type:String})],$.prototype,`errorMessage`,void 0),e.n([e.u({type:String})],$.prototype,`helptext`,void 0),e.n([e.u({type:String})],$.prototype,`helptextDropdown`,void 0),e.n([e.u({type:String,reflect:!1})],$.prototype,`helptextDropdownButton`,void 0),e.n([e.u({type:String})],$.prototype,`label`,void 0),e.n([e.u({type:String,reflect:!1})],$.prototype,`optionalText`,void 0),e.n([e.u({type:String,reflect:!1})],$.prototype,`requiredText`,void 0),e.n([e.u({type:String,reflect:!1})],$.prototype,`tagText`,void 0),e.n([e.u({type:String,attribute:`input-size`})],$.prototype,`inputSize`,void 0),e.n([e.u({type:String,attribute:`data-testid`})],$.prototype,`dataTestid`,void 0),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return $}});
|
|
1
|
+
const e=require("./element-DRc10X2R.cjs"),t=require("./format-B8meU8Tm.cjs"),n=require("./element-with-slot-DgtT8lCH.cjs"),r=require("./utils-63cRpWut.cjs"),i=require("./booleanish-BF8l4scU.cjs");var a=new WeakMap,o=new WeakMap,s=new WeakMap,c=new WeakMap,l=new WeakMap,u=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,h=new WeakMap,g=new WeakMap,_=new WeakMap,v=new WeakMap,y=new WeakMap,b=(e,t,n)=>{e.getAttribute(t)!==n&&e.setAttribute(t,n)},x=(e,t)=>{e.toggleAttribute(`internals-disabled`,t),t?b(e,`aria-disabled`,`true`):e.removeAttribute(`aria-disabled`),e.formDisabledCallback&&e.formDisabledCallback.apply(e,[t])},S=e=>{s.get(e).forEach(e=>{e.remove()}),s.set(e,[])},C=(e,t)=>{let n=document.createElement(`input`);return n.type=`hidden`,n.name=e.getAttribute(`name`),e.after(n),s.get(t).push(n),n},w=(e,t)=>{if(t.length){let n=Array.from(t);n.forEach(t=>t.addEventListener(`click`,e.click.bind(e)));let[r]=n,i=r.id;r.id||=(i=`${r.htmlFor}_Label`,i),b(e,`aria-labelledby`,i)}},T=e=>{let t=Array.from(e.elements).filter(e=>!e.tagName.includes(`-`)&&e.validity).map(e=>e.validity.valid),n=f.get(e)||[],r=Array.from(n).filter(e=>e.isConnected).map(e=>c.get(e).validity.valid),i=[...t,...r].includes(!1);e.toggleAttribute(`internals-invalid`,i),e.toggleAttribute(`internals-valid`,!i)},ee=e=>{T(O(e.target))},E=e=>{T(O(e.target))},te=e=>{let t=[`button[type=submit]`,`input[type=submit]`,`button:not([type])`].map(e=>`${e}:not([disabled])`).map(t=>`${t}:not([form])${e.id?`,${t}[form='${e.id}']`:``}`).join(`,`);e.addEventListener(`click`,n=>{if(n.target.closest(t)){let t=f.get(e);if(e.noValidate)return;t.size&&Array.from(t).reverse().map(e=>c.get(e).reportValidity()).includes(!1)&&n.preventDefault()}})},ne=e=>{let t=f.get(e.target);t&&t.size&&t.forEach(e=>{e.constructor.formAssociated&&e.formResetCallback&&e.formResetCallback.apply(e)})},D=(e,t,n)=>{if(t){let r=f.get(t);if(r)r.add(e);else{let n=new Set;n.add(e),f.set(t,n),te(t),t.addEventListener(`reset`,ne),t.addEventListener(`input`,ee),t.addEventListener(`change`,E)}u.set(t,{ref:e,internals:n}),e.constructor.formAssociated&&e.formAssociatedCallback&&setTimeout(()=>{e.formAssociatedCallback.apply(e,[t])},0),T(t)}},O=e=>{let t=e.parentNode;return t&&t.tagName!==`FORM`&&(t=O(t)),t},k=(e,t,n=DOMException)=>{if(!e.constructor.formAssociated)throw new n(t)},A=(e,t,n)=>{let r=f.get(e);return r&&r.size&&r.forEach(e=>{c.get(e)[n]()||(t=!1)}),t},j=e=>{let t=!1;if(e.constructor.formAssociated){let n=c.get(e);n===void 0&&(e.attachInternals(),n=c.get(e),t=!0);let{labels:r,form:i}=n;w(e,r),D(e,i,n)}return t};function M(){return typeof MutationObserver<`u`}var N={ariaAtomic:`aria-atomic`,ariaAutoComplete:`aria-autocomplete`,ariaBrailleLabel:`aria-braillelabel`,ariaBrailleRoleDescription:`aria-brailleroledescription`,ariaBusy:`aria-busy`,ariaChecked:`aria-checked`,ariaColCount:`aria-colcount`,ariaColIndex:`aria-colindex`,ariaColIndexText:`aria-colindextext`,ariaColSpan:`aria-colspan`,ariaCurrent:`aria-current`,ariaDescription:`aria-description`,ariaDisabled:`aria-disabled`,ariaExpanded:`aria-expanded`,ariaHasPopup:`aria-haspopup`,ariaHidden:`aria-hidden`,ariaInvalid:`aria-invalid`,ariaKeyShortcuts:`aria-keyshortcuts`,ariaLabel:`aria-label`,ariaLevel:`aria-level`,ariaLive:`aria-live`,ariaModal:`aria-modal`,ariaMultiLine:`aria-multiline`,ariaMultiSelectable:`aria-multiselectable`,ariaOrientation:`aria-orientation`,ariaPlaceholder:`aria-placeholder`,ariaPosInSet:`aria-posinset`,ariaPressed:`aria-pressed`,ariaReadOnly:`aria-readonly`,ariaRelevant:`aria-relevant`,ariaRequired:`aria-required`,ariaRoleDescription:`aria-roledescription`,ariaRowCount:`aria-rowcount`,ariaRowIndex:`aria-rowindex`,ariaRowIndexText:`aria-rowindextext`,ariaRowSpan:`aria-rowspan`,ariaSelected:`aria-selected`,ariaSetSize:`aria-setsize`,ariaSort:`aria-sort`,ariaValueMax:`aria-valuemax`,ariaValueMin:`aria-valuemin`,ariaValueNow:`aria-valuenow`,ariaValueText:`aria-valuetext`,role:`role`},P=(e,t)=>{for(let n in N){t[n]=null;let r=null,i=N[n];Object.defineProperty(t,n,{get(){return r},set(n){r=n,e.isConnected?b(e,i,n):m.set(e,t)}})}},re=(e,t)=>{s.set(t,[]),R.observe?.(e,L)};function F(e){let t=c.get(e),{form:n}=t;D(e,n,t),w(e,t.labels)}var I=(e,t=!1)=>{let n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(e){return c.has(e)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}}),r=n.nextNode(),i=!t||e.disabled;for(;r;)r.formDisabledCallback&&i&&x(r,e.disabled),r=n.nextNode()},L={attributes:!0,attributeFilter:[`disabled`,`name`]},R=M()?new MutationObserver(e=>{for(let t of e){let e=t.target;if(t.attributeName===`disabled`&&(e.constructor.formAssociated?x(e,e.hasAttribute(`disabled`)):e.localName===`fieldset`&&I(e)),t.attributeName===`name`&&e.constructor.formAssociated){let t=c.get(e),n=p.get(e);t.setFormValue(n)}}}):{};function z(e){e.forEach(e=>{let{addedNodes:t,removedNodes:n}=e,r=Array.from(t),i=Array.from(n);r.forEach(e=>{if(c.has(e)&&e.constructor.formAssociated&&F(e),m.has(e)){let t=m.get(e);Object.keys(N).filter(e=>t[e]!==null).forEach(n=>{b(e,N[n],t[n])}),m.delete(e)}if(y.has(e)){let t=y.get(e);b(e,`internals-valid`,t.validity.valid.toString()),b(e,`internals-invalid`,(!t.validity.valid).toString()),b(e,`aria-invalid`,(!t.validity.valid).toString()),y.delete(e)}if(e.localName===`form`){let t=f.get(e),n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(e){return c.has(e)&&e.constructor.formAssociated&&!(t&&t.has(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}}),r=n.nextNode();for(;r;)F(r),r=n.nextNode()}e.localName===`fieldset`&&(R.observe?.(e,L),I(e,!0))}),i.forEach(e=>{let t=c.get(e);t&&s.get(t)&&S(t),d.has(e)&&d.get(e).disconnect()})})}function ie(e){e.forEach(e=>{let{removedNodes:t}=e;t.forEach(t=>{let n=_.get(e.target);c.has(t)&&j(t),n.disconnect()})})}var ae=e=>{let t=new MutationObserver(ie);window?.ShadyDOM?.inUse&&e.mode&&e.host&&(e=e.host),t.observe?.(e,{childList:!0}),_.set(e,t)};M()&&new MutationObserver(z);var B={childList:!0,subtree:!0},oe=class{constructor(){this.badInput=!1,this.customError=!1,this.patternMismatch=!1,this.rangeOverflow=!1,this.rangeUnderflow=!1,this.stepMismatch=!1,this.tooLong=!1,this.tooShort=!1,this.typeMismatch=!1,this.valid=!0,this.valueMissing=!1,Object.seal(this)}},se=e=>(e.badInput=!1,e.customError=!1,e.patternMismatch=!1,e.rangeOverflow=!1,e.rangeUnderflow=!1,e.stepMismatch=!1,e.tooLong=!1,e.tooShort=!1,e.typeMismatch=!1,e.valid=!0,e.valueMissing=!1,e),ce=(e,t,n)=>(e.valid=le(t),Object.keys(t).forEach(n=>e[n]=t[n]),n&&T(n),e),le=e=>{let t=!0;for(let n in e)n!==`valid`&&e[n]!==!1&&(t=!1);return t},V=new WeakMap;function H(e,t){e.toggleAttribute(t,!0),e.part&&e.part.add(t)}var U=class extends Set{static get isPolyfilled(){return!0}constructor(e){if(super(),!e||!e.tagName||e.tagName.indexOf(`-`)===-1)throw TypeError(`Illegal constructor`);V.set(this,e)}add(e){if(!/^--/.test(e)||typeof e!=`string`)throw new DOMException(`Failed to execute 'add' on 'CustomStateSet': The specified value ${e} must start with '--'.`);let t=super.add(e),n=V.get(this),r=`state${e}`;return n.isConnected?H(n,r):setTimeout(()=>{H(n,r)}),t}clear(){for(let[e]of this.entries())this.delete(e);super.clear()}delete(e){let t=super.delete(e),n=V.get(this);return n.isConnected?(n.toggleAttribute(`state${e}`,!1),n.part&&n.part.remove(`state${e}`)):setTimeout(()=>{n.toggleAttribute(`state${e}`,!1),n.part&&n.part.remove(`state${e}`)}),t}},ue=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},W=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},G,de=class{constructor(e){G.set(this,void 0),ue(this,G,e,`f`);for(let t=0;t<e.length;t++){let n=e[t];this[t]=n,n.hasAttribute(`name`)&&(this[n.getAttribute(`name`)]=n)}Object.freeze(this)}get length(){return W(this,G,`f`).length}[(G=new WeakMap,Symbol.iterator)](){return W(this,G,`f`)[Symbol.iterator]()}item(e){return this[e]==null?null:this[e]}namedItem(e){return this[e]==null?null:this[e]}};function fe(){let e=HTMLFormElement.prototype.checkValidity;HTMLFormElement.prototype.checkValidity=n;let t=HTMLFormElement.prototype.reportValidity;HTMLFormElement.prototype.reportValidity=r;function n(...t){let n=e.apply(this,t);return A(this,n,`checkValidity`)}function r(...e){let n=t.apply(this,e);return A(this,n,`reportValidity`)}let{get:i}=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,`elements`);Object.defineProperty(HTMLFormElement.prototype,"elements",{get(...e){let t=i.call(this,...e),n=Array.from(f.get(this)||[]);return n.length===0?t:new de(Array.from(t).concat(n).sort((e,t)=>e.compareDocumentPosition?e.compareDocumentPosition(t)&2?1:-1:0))}})}var K=class{static get isPolyfilled(){return!0}constructor(e){if(!e||!e.tagName||e.tagName.indexOf(`-`)===-1)throw TypeError(`Illegal constructor`);let t=e.getRootNode(),n=new oe;this.states=new U(e),a.set(this,e),o.set(this,n),c.set(e,this),P(e,this),re(e,this),Object.seal(this),t instanceof DocumentFragment&&ae(t)}checkValidity(){let e=a.get(this);if(k(e,`Failed to execute 'checkValidity' on 'ElementInternals': The target element is not a form-associated custom element.`),!this.willValidate)return!0;let t=o.get(this);if(!t.valid){let t=new Event(`invalid`,{bubbles:!1,cancelable:!0,composed:!1});e.dispatchEvent(t)}return t.valid}get form(){let e=a.get(this);k(e,`Failed to read the 'form' property from 'ElementInternals': The target element is not a form-associated custom element.`);let t;return e.constructor.formAssociated===!0&&(t=O(e)),t}get labels(){let e=a.get(this);k(e,`Failed to read the 'labels' property from 'ElementInternals': The target element is not a form-associated custom element.`);let t=e.getAttribute(`id`),n=e.getRootNode();return n&&t?n.querySelectorAll(`[for="${t}"]`):[]}reportValidity(){let e=a.get(this);if(k(e,`Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.`),!this.willValidate)return!0;let t=this.checkValidity(),n=g.get(this);if(n&&!e.constructor.formAssociated)throw new DOMException(`Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.`);return!t&&n&&(e.focus(),n.focus()),t}setFormValue(e){let t=a.get(this);if(k(t,`Failed to execute 'setFormValue' on 'ElementInternals': The target element is not a form-associated custom element.`),S(this),e!=null&&!(e instanceof FormData)){if(t.getAttribute(`name`)){let n=C(t,this);n.value=e}}else e!=null&&e instanceof FormData&&Array.from(e).reverse().forEach(([e,n])=>{if(typeof n==`string`){let r=C(t,this);r.name=e,r.value=n}});p.set(t,e)}setValidity(e,t,n){let r=a.get(this);if(k(r,`Failed to execute 'setValidity' on 'ElementInternals': The target element is not a form-associated custom element.`),!e)throw TypeError(`Failed to execute 'setValidity' on 'ElementInternals': 1 argument required, but only 0 present.`);g.set(this,n);let i=o.get(this),s={};for(let t in e)s[t]=e[t];Object.keys(s).length===0&&se(i);let c={...i,...s};delete c.valid;let{valid:u}=ce(i,c,this.form);if(!u&&!t)throw new DOMException(`Failed to execute 'setValidity' on 'ElementInternals': The second argument should not be empty if one or more flags in the first argument are true.`);l.set(this,u?``:t),r.isConnected?(r.toggleAttribute(`internals-invalid`,!u),r.toggleAttribute(`internals-valid`,u),b(r,`aria-invalid`,`${!u}`)):y.set(r,this)}get shadowRoot(){let e=a.get(this);return h.get(e)||null}get validationMessage(){return k(a.get(this),`Failed to read the 'validationMessage' property from 'ElementInternals': The target element is not a form-associated custom element.`),l.get(this)}get validity(){return k(a.get(this),`Failed to read the 'validity' property from 'ElementInternals': The target element is not a form-associated custom element.`),o.get(this)}get willValidate(){let e=a.get(this);return k(e,`Failed to read the 'willValidate' property from 'ElementInternals': The target element is not a form-associated custom element.`),!(e.matches(`:disabled`)||e.disabled||e.hasAttribute(`disabled`)||e.hasAttribute(`readonly`))}};function pe(){if(typeof window>`u`||!window.ElementInternals||!HTMLElement.prototype.attachInternals)return!1;class e extends HTMLElement{constructor(){super(),this.internals=this.attachInternals()}}let t=`element-internals-feature-detection-${Math.random().toString(36).replace(/[^a-z]+/g,``)}`;customElements.define(t,e);let n=new e;return[`shadowRoot`,`form`,`willValidate`,`validity`,`validationMessage`,`labels`,`setFormValue`,`setValidity`,`checkValidity`,`reportValidity`].every(e=>e in n.internals)}var q=!1,J=!1;function Y(e){J||(J=!0,window.CustomStateSet=U,e&&(HTMLElement.prototype.attachInternals=function(...t){let n=e.call(this,t);return n.states=new U(this),n}))}function me(e=!0){let t=!1;if(!q){if(q=!0,typeof window<`u`&&(window.ElementInternals=K),typeof CustomElementRegistry<`u`){let e=CustomElementRegistry.prototype.define;CustomElementRegistry.prototype.define=function(n,r,i){if(r.formAssociated){let e=r.prototype.connectedCallback;r.prototype.connectedCallback=function(){v.has(this)||(v.set(this,!0),this.hasAttribute(`disabled`)&&x(this,!0)),e?.apply(this),t=j(this)}}e.call(this,n,r,i)}}if(typeof HTMLElement<`u`&&(HTMLElement.prototype.attachInternals=function(){if(!this.tagName)return{};if(this.tagName.indexOf(`-`)===-1)throw Error(`Failed to execute 'attachInternals' on 'HTMLElement': Unable to attach ElementInternals to non-custom elements.`);if(c.has(this)&&!t)throw new DOMException(`DOMException: Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.`);return new K(this)}),typeof Element<`u`){function n(...t){let n=e.apply(this,t);if(h.set(this,n),M()){let e=new MutationObserver(z);window.ShadyDOM?e.observe(this,B):e.observe(n,B),d.set(this,e)}return n}let e=Element.prototype.attachShadow;Element.prototype.attachShadow=n}M()&&typeof document<`u`&&new MutationObserver(z).observe(document.documentElement,B),typeof HTMLFormElement<`u`&&fe(),(e||typeof window<`u`&&!window.CustomStateSet)&&Y()}}customElements.polyfillWrapFlushCallback||(pe()?typeof window<`u`&&!window.CustomStateSet&&Y(HTMLElement.prototype.attachInternals):me(!1));var X=`on`,Z=`--checked`,Q=`,`,$=class extends n.t{static get formAssociated(){return!0}get ariaDescribedBy(){return this.ariaDescribedby}set ariaDescribedBy(e){this.ariaDescribedby=e}effectiveCounter(e){return this.counter??e}effectiveHasFieldset(e){return this.hasFieldset??e}constructor(){super(),this.defaultValue=null,this.disabled=!1,this.readonly=!1,this.required=!1,this.max=null,this.maxlength=null,this.min=null,this.minlength=null,this.step=null,this.ariaDescribedby=null,this.ariaLabelledby=null,this.name=``,this.pattern=null,this.placeholder=null,this.id=r.n(),this.counter=null,this.hasError=!1,this.inline=!1,this.hasFieldset=null,this.optionalTag=!1,this.requiredTag=!1,this.skipForwardTestid=!1,this.useWrapper=!0,this.fullwidth=!1,this.counterMaxLength=0,this.errorMessage=``,this.helptext=``,this.helptextDropdown=``,this.helptextDropdownButton=null,this.label=null,this.tagText=null,this.inputSize=`medium`,this.dataTestid=``,this.touched=!1,this._initialized=!1,this._didInitDerivedState=!1,this.internals=this.attachInternals()}manageValidity(e){if(!e){console.warn(`manageValidity called without valid input element`);return}let n=this.pktStrings.get(`validation`);this.required&&!this.value?this.internals.setValidity({valueMissing:!0},n.valueMissing,e):e.validity?.typeMismatch||e.validity?.badInput?this.internals.setValidity({typeMismatch:!0},n.typeMismatch,e):e.validity?.patternMismatch?this.internals.setValidity({patternMismatch:!0},n.patternMismatch,e):e.validity?.tooShort||this.minlength&&this.minlength>0&&this.value.length<this.minlength?this.internals.setValidity({tooShort:!0},n.tooShort,e):e.validity?.tooLong||this.maxlength&&this.maxlength>0&&this.value.length>this.maxlength?this.internals.setValidity({tooLong:!0},n.tooLong,e):e.validity?.rangeUnderflow?this.internals.setValidity({rangeUnderflow:!0},this.min?t.t(n.rangeUnderflowMin,{min:this.min.toString()}):n.rangeUnderflow,e):e.validity?.stepMismatch?this.internals.setValidity({stepMismatch:!0},n.typeMismatch,e):e.validity?.rangeOverflow?this.internals.setValidity({rangeOverflow:!0},this.max?t.t(n.rangeOverflowMax,{max:this.max.toString()}):n.rangeOverflow,e):e.validity?.customError?this.internals.setValidity({customError:!0},e.validationMessage,e):this.internals.setValidity({})}setFormValue(e){if(this.internals){if(Array.isArray(e)){let t=new FormData;e.forEach(e=>{t.append(this.name,e)}),this.internals.setFormValue(t)}else this.internals.setFormValue(e)}}coordinateRadioGroup(){if(!this.form||!this.name||this.type!==`radio`)return;let e=`pkt-radiobutton[name="${this.name}"], input[type=radio][name="${this.name}"]`;this.form.querySelectorAll(e).forEach(e=>{if(e!==this&&e.getAttribute(`name`)===this.name&&e.getAttribute(`value`)!==this.value){let t=e;t.checked&&(t.checked=!1,t.internals&&(t.internals.setFormValue(null),t.internals.states?.delete(Z)))}})}valueChecked(e){if(!this.touched)return;let t=this.internals.form||this.closest(`form`),n=t?new FormData(t):null;if(this.type===`radio`&&this.coordinateRadioGroup(),typeof e==`string`?(this.checked=e===`true`,this.internals.ariaChecked=String(e===`true`)):typeof e==`boolean`&&(this.checked=e,this.internals.ariaChecked=String(e)),this.checked){let e=(typeof this.value==`string`?this.value:``)||X;this.internals.setFormValue(e),n&&n.append(this.name,e),this.internals.states.add(Z)}else this.internals.setFormValue(null),n&&n.delete(this.name),this.internals.states.delete(Z);this.dispatchChangeEvents(this.checked),this.internals.reportValidity()}valueChanged(e,t){let n=e;if(typeof n==`number`||typeof n==`boolean`)e=String(n);else if(n!=null&&typeof n!=`string`&&!Array.isArray(n)){let e=typeof n==`object`?n?.constructor?.name??`object`:typeof n;console.warn(`${this.localName}: value må være en streng eller et tall, men fikk ${e}. Verdien ignoreres. For dato-/tidsfelt, send en ISO-formatert streng (f.eks. "2026-07-09" eller "13:45").`)}(t!==this.value||t!==this._value)&&(typeof e==`string`?((this.multiple||this.range)&&e.includes(Q)&&(e=e.split(Q)),this.value=e,this._value=Array.isArray(e)?e:[e]):Array.isArray(e)?(this.value=this.multiple||this.range?e:e[0],this._value=e):(this.value=``,this._value=[]),(!this.value||this.value.length===0)&&t&&t.length!==0?this.clearInputValue():this.value&&this.value.toString()!==t?.toString()&&this.onChange(this.value))}dispatchChangeEvents(e){this.dispatchEvent(new Event(`change`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`value-change`,{detail:e,bubbles:!0,composed:!0}))}clearInputValue(){let e=this.multiple||this.range?[]:``;this.value=e,this.setFormValue(e),this.dispatchChangeEvents(e)}onFocus(){this.dispatchEvent(new FocusEvent(`focus`,{bubbles:!0,composed:!0}))}onBlur(){this.dispatchEvent(new FocusEvent(`blur`,{bubbles:!0,composed:!0}))}onInput(){this.dispatchEvent(new InputEvent(`input`,{bubbles:!0,composed:!0}))}normalizeValue(e){return(this.range||this.multiple)&&typeof e==`string`&&e.includes(Q)?e.split(Q):!this.multiple&&!this.range&&Array.isArray(e)?e[0]||``:e}validate(){this.inputRef?.value&&this.manageValidity(this.inputRef.value),this.inputRefTo?.value&&this.manageValidity(this.inputRefTo.value)}onChange(e){if(this.touched=!0,typeof e!=`string`&&!Array.isArray(e))return;let t=this.normalizeValue(e);this.setFormValue(t),this.validate(),this._initialized&&this.dispatchChangeEvents(t)}formResetCallback(){if(this.touched=!1,this._options&&this._options.length&&this._options.forEach(e=>{`selected`in e&&(e.selected=!1)}),this.checked!==void 0)this.checked=!1,this.internals.ariaChecked=`false`,this.internals.setFormValue(``),this.inputRef?.value&&`checked`in this.inputRef.value&&(this.inputRef.value.checked=!1),this.valueChecked(this.checked);else{this.internals.setFormValue(``);let e=this.defaultValue||(this.multiple||this.range?[]:``);this.value=e,this._value=Array.isArray(e)?e:[e],this.valueChanged(this.value,null)}this.internals.ariaInvalid=`false`}updated(e){super.updated(e),e.has(`dataTestid`)&&this.dataTestid&&this.inputRef.value&&(this.skipForwardTestid?this.hasAttribute(`data-testid`)||this.setAttribute(`data-testid`,this.dataTestid):(this.inputRef.value.dataset.testid=this.dataTestid,this.removeAttribute(`data-testid`)))}willUpdate(e){super.willUpdate(e),!this._didInitDerivedState&&(this._didInitDerivedState=!0,this.form||=this.internals.form||this.closest(`form`),this.defaultChecked&&(this.checked=!0),this.id&&!this.name&&(this.name=this.id),this.value&&this.defaultValue===null&&(this.defaultValue=this.value),this.defaultValue!==null&&!this.value&&this.valueChanged(this.defaultValue,null))}firstUpdated(e){if(super.firstUpdated(e),this.value&&this.defaultValue===null&&(this.defaultValue=this.value),this.defaultValue!==null&&!this.value&&this.valueChanged(this.defaultValue,null),this.defaultChecked&&(this.internals.ariaChecked=`true`),this.required&&(this.internals.ariaRequired=`true`),this.disabled&&(this.internals.ariaDisabled=`true`),this.checked!==void 0){let e=this.checked===``||this.checked===`true`||this.checked===!0;this.internals.ariaChecked=String(e);let t=e?(typeof this.value==`string`?this.value:``)||X:null;this.internals.setFormValue(t)}else this.setFormValue(this.value);this.inputRef&&this.inputRef.value&&(this.inputRef.value.setAttribute(`form`,``),this.manageValidity(this.inputRef.value)),this.inputRefTo&&this.inputRefTo.value&&(this.inputRefTo.value.setAttribute(`form`,``),this.manageValidity(this.inputRefTo.value)),this.updateComplete.then(()=>{this._initialized=!0})}};e.n([e.u({type:Boolean,reflect:!0})],$.prototype,`checked`,void 0),e.n([e.u({type:Boolean})],$.prototype,`defaultChecked`,void 0),e.n([e.u({type:Boolean})],$.prototype,`multiple`,void 0),e.n([e.u({type:Boolean})],$.prototype,`range`,void 0),e.n([e.u({type:String,reflect:!0})],$.prototype,`type`,void 0),e.n([e.u()],$.prototype,`defaultValue`,void 0),e.n([e.u({type:Boolean,reflect:!0})],$.prototype,`disabled`,void 0),e.n([e.u({type:Boolean,reflect:!0})],$.prototype,`readonly`,void 0),e.n([e.u({type:Boolean,reflect:!0})],$.prototype,`required`,void 0),e.n([e.u({reflect:!0,converter:{fromAttribute:e=>e,toAttribute:e=>e?.toString()??null}})],$.prototype,`max`,void 0),e.n([e.u({type:Number,reflect:!0})],$.prototype,`maxlength`,void 0),e.n([e.u({reflect:!0,converter:{fromAttribute:e=>e,toAttribute:e=>e?.toString()??null}})],$.prototype,`min`,void 0),e.n([e.u({type:Number,reflect:!0})],$.prototype,`minlength`,void 0),e.n([e.u({type:Number,reflect:!0})],$.prototype,`step`,void 0),e.n([e.u({type:String,attribute:`aria-describedby`})],$.prototype,`ariaDescribedby`,void 0),e.n([e.u({type:String,attribute:`aria-labelledby`})],$.prototype,`ariaLabelledby`,void 0),e.n([e.u({type:String,reflect:!0})],$.prototype,`name`,void 0),e.n([e.u({type:String,reflect:!0})],$.prototype,`pattern`,void 0),e.n([e.u({type:String,reflect:!0})],$.prototype,`placeholder`,void 0),e.n([e.u({type:String,reflect:!0})],$.prototype,`id`,void 0),e.n([e.u({type:Boolean,converter:i.n})],$.prototype,`counter`,void 0),e.n([e.u({type:Boolean})],$.prototype,`hasError`,void 0),e.n([e.u({type:Boolean})],$.prototype,`inline`,void 0),e.n([e.u({type:Boolean,converter:i.n})],$.prototype,`hasFieldset`,void 0),e.n([e.u({type:Boolean})],$.prototype,`optionalTag`,void 0),e.n([e.u({type:Boolean})],$.prototype,`requiredTag`,void 0),e.n([e.u({type:Boolean})],$.prototype,`skipForwardTestid`,void 0),e.n([e.u({type:Boolean,reflect:!0,converter:i.t})],$.prototype,`useWrapper`,void 0),e.n([e.u({type:Boolean,reflect:!0})],$.prototype,`fullwidth`,void 0),e.n([e.u({type:Number})],$.prototype,`counterMaxLength`,void 0),e.n([e.u({type:String})],$.prototype,`errorMessage`,void 0),e.n([e.u({type:String})],$.prototype,`helptext`,void 0),e.n([e.u({type:String})],$.prototype,`helptextDropdown`,void 0),e.n([e.u({type:String,reflect:!1})],$.prototype,`helptextDropdownButton`,void 0),e.n([e.u({type:String})],$.prototype,`label`,void 0),e.n([e.u({type:String,reflect:!1})],$.prototype,`optionalText`,void 0),e.n([e.u({type:String,reflect:!1})],$.prototype,`requiredText`,void 0),e.n([e.u({type:String,reflect:!1})],$.prototype,`tagText`,void 0),e.n([e.u({type:String,attribute:`input-size`})],$.prototype,`inputSize`,void 0),e.n([e.u({type:String,attribute:`data-testid`})],$.prototype,`dataTestid`,void 0),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return $}});
|
|
@@ -585,7 +585,7 @@ var X = "on", Z = "--checked", Q = ",", $ = class extends r {
|
|
|
585
585
|
super.updated(e), e.has("dataTestid") && this.dataTestid && this.inputRef.value && (this.skipForwardTestid ? this.hasAttribute("data-testid") || this.setAttribute("data-testid", this.dataTestid) : (this.inputRef.value.dataset.testid = this.dataTestid, this.removeAttribute("data-testid")));
|
|
586
586
|
}
|
|
587
587
|
willUpdate(e) {
|
|
588
|
-
super.willUpdate(e), !this._didInitDerivedState && (this._didInitDerivedState = !0, this.form ||= this.internals.form || this.closest("form"), this.defaultChecked && (this.checked = !0), this.id && !this.name && (this.name = this.id));
|
|
588
|
+
super.willUpdate(e), !this._didInitDerivedState && (this._didInitDerivedState = !0, this.form ||= this.internals.form || this.closest("form"), this.defaultChecked && (this.checked = !0), this.id && !this.name && (this.name = this.id), this.value && this.defaultValue === null && (this.defaultValue = this.value), this.defaultValue !== null && !this.value && this.valueChanged(this.defaultValue, null));
|
|
589
589
|
}
|
|
590
590
|
firstUpdated(e) {
|
|
591
591
|
if (super.firstUpdated(e), this.value && this.defaultValue === null && (this.defaultValue = this.value), this.defaultValue !== null && !this.value && this.valueChanged(this.defaultValue, null), this.defaultChecked && (this.internals.ariaChecked = "true"), this.required && (this.internals.ariaRequired = "true"), this.disabled && (this.internals.ariaDisabled = "true"), this.checked !== void 0) {
|
|
@@ -605,7 +605,7 @@ e([t({
|
|
|
605
605
|
})], $.prototype, "checked", void 0), e([t({ type: Boolean })], $.prototype, "defaultChecked", void 0), e([t({ type: Boolean })], $.prototype, "multiple", void 0), e([t({ type: Boolean })], $.prototype, "range", void 0), e([t({
|
|
606
606
|
type: String,
|
|
607
607
|
reflect: !0
|
|
608
|
-
})], $.prototype, "type", void 0), e([t(
|
|
608
|
+
})], $.prototype, "type", void 0), e([t()], $.prototype, "defaultValue", void 0), e([t({
|
|
609
609
|
type: Boolean,
|
|
610
610
|
reflect: !0
|
|
611
611
|
})], $.prototype, "disabled", void 0), e([t({
|
package/dist/pkt-calendar.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./calendar-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./calendar-CA1mz04B.cjs");exports.PktCalendar=e.n,exports.default=e.t;
|
package/dist/pkt-calendar.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "./calendar-
|
|
1
|
+
import { n as e, t } from "./calendar-CBghTpkZ.js";
|
|
2
2
|
export { e as PktCalendar, t as default };
|
package/dist/pkt-checkbox.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./checkbox-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./checkbox-BxDlOeQR.cjs");exports.PktCheckbox=e.n,exports.default=e.t;
|
package/dist/pkt-checkbox.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "./checkbox-
|
|
1
|
+
import { n as e, t } from "./checkbox-U3KfKBLv.js";
|
|
2
2
|
export { e as PktCheckbox, t as default };
|
package/dist/pkt-combobox.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./combobox-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./combobox-CjQiFSKd.cjs");exports.PktCombobox=e.n,exports.default=e.t;
|
package/dist/pkt-combobox.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "./combobox-
|
|
1
|
+
import { n as e, t } from "./combobox-8YJJthxD.js";
|
|
2
2
|
export { e as PktCombobox, t as default };
|
package/dist/pkt-datepicker.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./datepicker-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./datepicker-CN_9JAxo.cjs");var t=e.t;exports.PktDatepicker=e.t,exports.PktDatepickerMultiple=e.n,exports.PktDatepickerRange=e.r,exports.PktDatepickerSingle=e.i,exports.default=t;
|
package/dist/pkt-datepicker.js
CHANGED
package/dist/pkt-header.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./header-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./header-D_UJ70pO.cjs");exports.PktHeader=e.t,exports.PktHeaderGlobal=e.n,exports.PktHeaderService=e.r,exports.PktHeaderUserMenu=e.i,exports.formatLastLoggedIn=e.a;
|
package/dist/pkt-header.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, r, t as i } from "./header-
|
|
1
|
+
import { a as e, i as t, n, r, t as i } from "./header-NPxBtRhJ.js";
|
|
2
2
|
export { i as PktHeader, n as PktHeaderGlobal, r as PktHeaderService, t as PktHeaderUserMenu, e as formatLastLoggedIn };
|
package/dist/pkt-index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./element-DRc10X2R.cjs"),t=require("./consent-D1SMUJLs.cjs"),n=require("./alert-HFqn-cvb.cjs"),r=require("./icon-DBFTFd-J.cjs"),i=require("./button-CIb0IxTg.cjs"),a=require("./accordion-NO9LYXaN.cjs"),o=require("./backlink-DYO8qA9C.cjs"),s=require("./breadcrumbs-HG9wzGtr.cjs"),c=require("./calendar-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./element-DRc10X2R.cjs"),t=require("./consent-D1SMUJLs.cjs"),n=require("./alert-HFqn-cvb.cjs"),r=require("./icon-DBFTFd-J.cjs"),i=require("./button-CIb0IxTg.cjs"),a=require("./accordion-NO9LYXaN.cjs"),o=require("./backlink-DYO8qA9C.cjs"),s=require("./breadcrumbs-HG9wzGtr.cjs"),c=require("./calendar-CA1mz04B.cjs"),l=require("./card-b7jjKk6B.cjs"),u=require("./tag-Cojf4jgA.cjs"),d=require("./combobox-CjQiFSKd.cjs"),f=require("./header-D_UJ70pO.cjs"),p=require("./input-wrapper-791L3L--.cjs"),m=require("./helptext-DyHzv2ZG.cjs"),h=require("./checkbox-BxDlOeQR.cjs"),g=require("./fileupload-BmT5nQX0.cjs"),_=require("./modal-C1g2fiUq.cjs"),v=require("./progressbar-BpcsDCnG.cjs"),y=require("./datepicker-CN_9JAxo.cjs"),b=require("./footer-CLSihvYS.cjs"),x=require("./link-BWAhHUku.cjs"),S=require("./textinput-THsTffFY.cjs"),C=require("./searchinput-CiPB8xvh.cjs"),w=require("./header-menu-wcnhBSzs.cjs"),T=require("./heading-OfJKjUi2.cjs"),E=require("./linkcard-D6fRaZSc.cjs"),D=require("./loader-B5t78Yk7.cjs"),O=require("./messagebox-DBVUz-DN.cjs"),k=require("./radiobutton-DbHXj09u.cjs"),A=require("./tabs-DqzPOdi9.cjs"),j=require("./textarea-BHISs7EC.cjs"),M=require("./select-ZlTO1P9_.cjs"),N=require("./timepicker-Cwy8K6Af.cjs");exports.PktAccordion=a.r,exports.PktAccordionItem=a.n,exports.PktAlert=n.n,exports.PktBackLink=o.n,exports.PktBreadcrumbs=s.t,exports.PktButton=i.n,exports.PktCalendar=c.n,exports.PktCard=l.n,exports.PktCheckbox=h.n,exports.PktCombobox=d.n,exports.PktConsent=t.n,exports.PktDateTags=y.a,exports.PktDatepicker=y.t,Object.defineProperty(exports,"PktFileUpload",{enumerable:!0,get:function(){return g.n}}),exports.PktFooter=b.n,exports.PktFooterSimple=b.t,exports.PktHeader=f.t,exports.PktHeaderGlobal=f.n,exports.PktHeaderMenu=w.n,exports.PktHeaderService=f.r,exports.PktHeaderUserMenu=f.i,exports.PktHeading=T.n,exports.PktHelptext=m.n,exports.PktIcon=r.n,exports.PktInputWrapper=p.n,exports.PktLink=x.n,exports.PktLinkCard=E.n,exports.PktLoader=D.n,exports.PktMessagebox=O.n,exports.PktModal=_.n,exports.PktProgressbar=v.n,exports.PktRadioButton=k.n,exports.PktRadiobutton=k.n,exports.PktSearchInput=C.n,exports.PktSelect=M.n,exports.PktTabItem=A.n,exports.PktTabs=A.r,exports.PktTag=u.n,exports.PktTextarea=j.n,exports.PktTextinput=S.n,exports.PktTimepicker=N.t,exports.getPktStrings=e.r,exports.pktStringsNb=e.s,exports.resetPktStrings=e.i,exports.setPktStrings=e.a,exports.subscribePktStrings=e.o;
|
package/dist/pkt-index.js
CHANGED
|
@@ -6,30 +6,30 @@ import { n as c } from "./button-DWMHtdWk.js";
|
|
|
6
6
|
import { n as l, r as u } from "./accordion-BI-Qiznz.js";
|
|
7
7
|
import { n as d } from "./backlink-BHtxOlTw.js";
|
|
8
8
|
import { t as f } from "./breadcrumbs-BlRDuZbZ.js";
|
|
9
|
-
import { n as p } from "./calendar-
|
|
9
|
+
import { n as p } from "./calendar-CBghTpkZ.js";
|
|
10
10
|
import { n as m } from "./card-CwvUQj1a.js";
|
|
11
11
|
import { n as h } from "./tag-D2Xvsy1i.js";
|
|
12
|
-
import { n as g } from "./combobox-
|
|
13
|
-
import { i as _, n as v, r as y, t as b } from "./header-
|
|
12
|
+
import { n as g } from "./combobox-8YJJthxD.js";
|
|
13
|
+
import { i as _, n as v, r as y, t as b } from "./header-NPxBtRhJ.js";
|
|
14
14
|
import { n as x } from "./input-wrapper-B4TCGGwj.js";
|
|
15
15
|
import { n as S } from "./helptext-DqdOdYRj.js";
|
|
16
|
-
import { n as C } from "./checkbox-
|
|
16
|
+
import { n as C } from "./checkbox-U3KfKBLv.js";
|
|
17
17
|
import { n as w } from "./fileupload-4nTdjPKw.js";
|
|
18
18
|
import { n as T } from "./modal-z5RzZ-fr.js";
|
|
19
19
|
import { n as E } from "./progressbar-BPHLC7ce.js";
|
|
20
|
-
import { a as D, t as O } from "./datepicker-
|
|
20
|
+
import { a as D, t as O } from "./datepicker-9zom2dyI.js";
|
|
21
21
|
import { n as k, t as A } from "./footer-YrlXRq7e.js";
|
|
22
22
|
import { n as j } from "./link-BvjWWWlc.js";
|
|
23
|
-
import { n as M } from "./textinput-
|
|
23
|
+
import { n as M } from "./textinput-kp1242Ci.js";
|
|
24
24
|
import { n as N } from "./searchinput-DrUcPajl.js";
|
|
25
25
|
import { n as P } from "./header-menu-DKAcUFzh.js";
|
|
26
26
|
import { n as F } from "./heading-C23xQS4l.js";
|
|
27
27
|
import { n as I } from "./linkcard-6CbGf4I_.js";
|
|
28
28
|
import { n as L } from "./loader-BS7EJqxD.js";
|
|
29
29
|
import { n as R } from "./messagebox-Bt0IvUlD.js";
|
|
30
|
-
import { n as z } from "./radiobutton-
|
|
30
|
+
import { n as z } from "./radiobutton-Dm-IW6aF.js";
|
|
31
31
|
import { n as B, r as V } from "./tabs-DHvCjUi4.js";
|
|
32
|
-
import { n as H } from "./textarea-
|
|
33
|
-
import { n as U } from "./select-
|
|
34
|
-
import { t as W } from "./timepicker-
|
|
32
|
+
import { n as H } from "./textarea-CTlA6EGR.js";
|
|
33
|
+
import { n as U } from "./select-B6ZUZ3tj.js";
|
|
34
|
+
import { t as W } from "./timepicker-BBaAVpH_.js";
|
|
35
35
|
export { u as PktAccordion, l as PktAccordionItem, o as PktAlert, d as PktBackLink, f as PktBreadcrumbs, c as PktButton, p as PktCalendar, m as PktCard, C as PktCheckbox, g as PktCombobox, a as PktConsent, D as PktDateTags, O as PktDatepicker, w as PktFileUpload, k as PktFooter, A as PktFooterSimple, b as PktHeader, v as PktHeaderGlobal, P as PktHeaderMenu, y as PktHeaderService, _ as PktHeaderUserMenu, F as PktHeading, S as PktHelptext, s as PktIcon, x as PktInputWrapper, j as PktLink, I as PktLinkCard, L as PktLoader, R as PktMessagebox, T as PktModal, E as PktProgressbar, z as PktRadioButton, z as PktRadiobutton, N as PktSearchInput, U as PktSelect, B as PktTabItem, V as PktTabs, h as PktTag, H as PktTextarea, M as PktTextinput, W as PktTimepicker, r as getPktStrings, i as pktStringsNb, t as resetPktStrings, e as setPktStrings, n as subscribePktStrings };
|
package/dist/pkt-radiobutton.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./radiobutton-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./radiobutton-DbHXj09u.cjs");exports.PktRadioButton=e.n,exports.default=e.t;
|
package/dist/pkt-radiobutton.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "./radiobutton-
|
|
1
|
+
import { n as e, t } from "./radiobutton-Dm-IW6aF.js";
|
|
2
2
|
export { e as PktRadioButton, t as default };
|
package/dist/pkt-select.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./select-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./select-ZlTO1P9_.cjs");exports.PktSelect=e.n,exports.default=e.t;
|
package/dist/pkt-select.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "./select-
|
|
1
|
+
import { n as e, t } from "./select-B6ZUZ3tj.js";
|
|
2
2
|
export { e as PktSelect, t as default };
|
package/dist/pkt-textarea.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./textarea-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./textarea-BHISs7EC.cjs");exports.PktTextarea=e.n,exports.default=e.t;
|
package/dist/pkt-textarea.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "./textarea-
|
|
1
|
+
import { n as e, t } from "./textarea-CTlA6EGR.js";
|
|
2
2
|
export { e as PktTextarea, t as default };
|
package/dist/pkt-textinput.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./textinput-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./textinput-THsTffFY.cjs");exports.PktTextinput=e.n,exports.default=e.t;
|
package/dist/pkt-textinput.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "./textinput-
|
|
1
|
+
import { n as e, t } from "./textinput-kp1242Ci.js";
|
|
2
2
|
export { e as PktTextinput, t as default };
|
package/dist/pkt-timepicker.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./timepicker-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./timepicker-Cwy8K6Af.cjs");exports.PktTimepicker=e.t;
|
package/dist/pkt-timepicker.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./timepicker-
|
|
1
|
+
import { t as e } from "./timepicker-BBaAVpH_.js";
|
|
2
2
|
export { e as PktTimepicker };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require("./element-DRc10X2R.cjs"),t=require("./class-map-BEib48YL.cjs"),n=require("./ref-BkV4Cd8U.cjs"),r=require("./input-element-
|
|
1
|
+
const e=require("./element-DRc10X2R.cjs"),t=require("./class-map-BEib48YL.cjs"),n=require("./ref-BkV4Cd8U.cjs"),r=require("./input-element-BaXrl0h5.cjs");var i=class extends r.t{constructor(...e){super(...e),this.inputRef=n.t(),this.value=``,this.checkHelptext=null,this.defaultChecked=!1,this.hasTile=!1,this.checked=null,this.type=`radio`,this.tagText=null,this.optionalTag=!1,this.requiredTag=!1,this._checked=!1}connectedCallback(){super.connectedCallback()}attributeChangedCallback(e,t,n){e===`defaultChecked`&&(this._checked=this.defaultChecked),e===`checked`&&(this._checked=this.checked===``||this.checked===`true`||this.checked===!0),super.attributeChangedCallback(e,t,n)}render(){let r=t.t({"pkt-input-check__input":!0,"pkt-input-check__input--tile":this.hasTile,"pkt-input-check__input--tile-disabled":this.disabled&&this.hasTile}),i=t.t({"pkt-input-check__input-checkbox":!0,"pkt-input-check__input-checkbox--error":this.hasError}),a=t.t({"pkt-input-check__input-label":!0,"pkt-input-check__input-label--disabled":this.disabled,"pkt-sr-only":this.hideLabel}),o=`pkt-tag pkt-tag--small pkt-tag--thin-text`,s=this.pktStrings.get(`forms`);return e._`
|
|
2
2
|
<div class="pkt-input-check">
|
|
3
3
|
<div class=${r}>
|
|
4
4
|
<input
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as e, d as t, h as n, l as r, n as i, u as a } from "./element-e2MAMNEP.js";
|
|
2
2
|
import { t as o } from "./class-map-BL_YL_Ed.js";
|
|
3
3
|
import { n as s, t as c } from "./ref-lE1mGUOL.js";
|
|
4
|
-
import { t as l } from "./input-element-
|
|
4
|
+
import { t as l } from "./input-element-DQri-M3O.js";
|
|
5
5
|
//#region src/components/radiobutton/radiobutton.ts
|
|
6
6
|
var u = class extends l {
|
|
7
7
|
constructor(...e) {
|
|
@@ -2,7 +2,7 @@ import { _ as e, d as t, l as n, n as r, u as i } from "./element-e2MAMNEP.js";
|
|
|
2
2
|
import { t as a } from "./if-defined-r8tKY4tG.js";
|
|
3
3
|
import { r as o } from "./element-with-slot-GwTT3WRD.js";
|
|
4
4
|
import { n as s, t as c } from "./ref-lE1mGUOL.js";
|
|
5
|
-
import { t as l } from "./input-element-
|
|
5
|
+
import { t as l } from "./input-element-DQri-M3O.js";
|
|
6
6
|
import { t as u } from "./pkt-options-controller-DKkmDDzT.js";
|
|
7
7
|
import { r as d } from "./input-wrapper-B4TCGGwj.js";
|
|
8
8
|
//#region src/base-elements/options-input-element.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require("./element-DRc10X2R.cjs"),t=require("./if-defined-BeVQnl3C.cjs"),n=require("./element-with-slot-DgtT8lCH.cjs"),r=require("./ref-BkV4Cd8U.cjs"),i=require("./input-element-
|
|
1
|
+
const e=require("./element-DRc10X2R.cjs"),t=require("./if-defined-BeVQnl3C.cjs"),n=require("./element-with-slot-DgtT8lCH.cjs"),r=require("./ref-BkV4Cd8U.cjs"),i=require("./input-element-BaXrl0h5.cjs"),a=require("./pkt-options-controller-AFYyv3-b.cjs"),o=require("./input-wrapper-791L3L--.cjs");var s=class extends i.t{constructor(...e){super(...e),this._optionsProp=[],this._options=[]}get options(){return this._options.map(e=>({...e,selected:this.isOptionSelected(e)}))}set options(e){this._optionsProp=e,this.requestUpdate(`_optionsProp`,this._options)}isOptionSelected(e){return Array.isArray(this.value)?this.value.includes(e.value):e.value===this.value}findOptionByValue(e){return this._options.find(t=>t.value===e)}getSelectedOptions(){return this._options.filter(e=>this.isOptionSelected(e))}parseOptions(){let e=this._optionsProp.length>0,t=this.optionsController?.nodes?.length&&this.optionsController.nodes.length>0;e?this._options=this._optionsProp:t&&(this._options=this.optionsController.options)}willUpdate(e){super.willUpdate(e),this.parseOptions()}};e.n([e.u({type:Array,attribute:`options`})],s.prototype,`_optionsProp`,void 0),e.n([e.l()],s.prototype,`_options`,void 0);var c=class extends s{constructor(){super(),this.inputRef=r.t(),this.value=``,this.selectedIndex=-1,this.selectedOptions=void 0,this.optionsController=new a.t(this)}connectedCallback(){super.connectedCallback(),this.parseOptions(),this._options.forEach(e=>{e.selected&&!this.value&&(this.value=e.value)})}add(e,t){let n={value:e.value||e.text,label:e.text||e.value,selected:e.selected,disabled:e.disabled};if(t===void 0)this._options.push(n);else if(typeof t==`number`)this._options.splice(t,0,n);else{let e=t.value||t.text,r=this._options.findIndex(t=>t.value===e);r>=0?this._options.splice(r,0,n):this._options.push(n)}e.selected&&(this.value=e.value||e.text,this.selectedIndex=this._options.findIndex(e=>e.value===this.value)),this.requestUpdate()}remove(e){typeof e==`number`&&(this.selectedIndex===e&&(this.value=this._options[0]?.value||``),this._options.splice(e,1),this.requestUpdate())}item(e){return this.inputRef.value?.item(e)}namedItem(e){return this.inputRef.value?.namedItem(e)}showPicker(){this.inputRef.value&&`showPicker`in this.inputRef.value&&this.inputRef.value.showPicker()}attributeChangedCallback(e,t,n){e===`options`&&(this._options=n?JSON.parse(n):[]),e===`value`&&this.value!==t&&(this.selectedIndex=this.touched?this.returnNumberOrNull(this.inputRef.value?.selectedIndex):this._options.findIndex(e=>e.value===n),this.selectedOptions=this.inputRef.value?.selectedOptions,this.valueChanged(n,t)),super.attributeChangedCallback(e,t,n)}update(e){super.update(e),e.has(`_optionsProp`)&&this._optionsProp.length>0&&(this._options=this._optionsProp,this.requestUpdate(`_options`),!this.value&&this._options.length>0&&(this.value=this._options[0].value,this.selectedIndex=0)),e.has(`value`)&&this.value!==e.get(`value`)&&(this.selectedIndex=this.touched?this.returnNumberOrNull(this.inputRef.value?.selectedIndex):this._options.findIndex(e=>e.value===this.value),this.selectedOptions=this.inputRef.value?.selectedOptions,this.valueChanged(this.value,e.get(`value`))),e.has(`id`)&&!this.name&&this.id&&(this.name=this.id)}firstUpdated(e){super.firstUpdated(e),this.classList.add(`pkt-select`),this._optionsProp.length&&(this._options=this._optionsProp),!this.value&&this._options.length>0?(this.value=this._options[0].value,this.selectedIndex=0):this.selectedIndex=this._options.findIndex(e=>e.value===this.value),this.selectedOptions=this.inputRef.value?.selectedOptions}render(){let i=`pkt-input pkt-input--${this.inputSize} ${this.fullwidth?`pkt-input--fullwidth`:``}`;return e._`
|
|
2
2
|
<pkt-input-wrapper
|
|
3
3
|
.strings=${this.strings}
|
|
4
4
|
.size=${this.inputSize}
|
|
@@ -5,6 +5,73 @@
|
|
|
5
5
|
* Used by both Elements and React calendar implementations
|
|
6
6
|
* and by the shared calendar helper functions.
|
|
7
7
|
*/
|
|
8
|
+
import type { IPktStringsProps } from '../shared-strings';
|
|
9
|
+
/** Calendar props shared by React and Elements. */
|
|
10
|
+
export interface IPktCalendarBase extends IPktStringsProps<'dates' | 'calendar'> {
|
|
11
|
+
id?: string;
|
|
12
|
+
currentmonth?: Date | string | null;
|
|
13
|
+
selected?: string[];
|
|
14
|
+
excludeweekdays?: string[];
|
|
15
|
+
excludedates?: Date[] | string[];
|
|
16
|
+
earliest?: string | null;
|
|
17
|
+
latest?: string | null;
|
|
18
|
+
weeknumbers?: boolean;
|
|
19
|
+
withcontrols?: boolean;
|
|
20
|
+
multiple?: boolean;
|
|
21
|
+
maxMultiple?: number;
|
|
22
|
+
range?: boolean;
|
|
23
|
+
today?: string | null;
|
|
24
|
+
}
|
|
25
|
+
export declare const CALENDAR_DEFAULTS: {
|
|
26
|
+
readonly multiple: false;
|
|
27
|
+
readonly maxMultiple: 0;
|
|
28
|
+
readonly range: false;
|
|
29
|
+
readonly earliest: any;
|
|
30
|
+
readonly latest: any;
|
|
31
|
+
readonly weeknumbers: false;
|
|
32
|
+
readonly withcontrols: false;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Documented Calendar props (subset of `IPktCalendarBase`), plus the
|
|
36
|
+
* React-only selection/close callbacks and the Elements-only deprecated
|
|
37
|
+
* per-string props that `strings` / `setPktStrings()` have superseded.
|
|
38
|
+
*/
|
|
39
|
+
export type ICalendarSpecProps = Pick<IPktCalendarBase, 'id' | 'currentmonth' | 'selected' | 'excludeweekdays' | 'excludedates' | 'earliest' | 'latest' | 'weeknumbers' | 'withcontrols' | 'multiple' | 'maxMultiple' | 'range' | 'today'> & {
|
|
40
|
+
/**
|
|
41
|
+
* React-only callback fired with the updated selection (ISO date strings).
|
|
42
|
+
* @remarks Elements-paritet: `date-selected`-eventet.
|
|
43
|
+
*/
|
|
44
|
+
onDateSelected?: (selected: string[]) => void;
|
|
45
|
+
/**
|
|
46
|
+
* React-only callback fired when the calendar requests to close (Escape or focus-out).
|
|
47
|
+
* @remarks Elements-paritet: `close`-eventet.
|
|
48
|
+
*/
|
|
49
|
+
onClose?: () => void;
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated Elements-only. Bruk `strings={{ dates: { daysShort: [...] } }}` eller `setPktStrings()`.
|
|
52
|
+
*/
|
|
53
|
+
dayStrings?: string[];
|
|
54
|
+
/**
|
|
55
|
+
* @deprecated Elements-only. Bruk `strings={{ dates: { days: [...] } }}` eller `setPktStrings()`.
|
|
56
|
+
*/
|
|
57
|
+
dayStringsLong?: string[];
|
|
58
|
+
/**
|
|
59
|
+
* @deprecated Elements-only. Bruk `strings={{ dates: { months: [...] } }}` eller `setPktStrings()`.
|
|
60
|
+
*/
|
|
61
|
+
monthStrings?: string[];
|
|
62
|
+
/**
|
|
63
|
+
* @deprecated Elements-only. Bruk `strings={{ dates: { week: '...' } }}` eller `setPktStrings()`.
|
|
64
|
+
*/
|
|
65
|
+
weekString?: string;
|
|
66
|
+
/**
|
|
67
|
+
* @deprecated Elements-only. Bruk `strings={{ calendar: { prevMonth: '...' } }}` eller `setPktStrings()`.
|
|
68
|
+
*/
|
|
69
|
+
prevMonthString?: string;
|
|
70
|
+
/**
|
|
71
|
+
* @deprecated Elements-only. Bruk `strings={{ calendar: { nextMonth: '...' } }}` eller `setPktStrings()`.
|
|
72
|
+
*/
|
|
73
|
+
nextMonthString?: string;
|
|
74
|
+
};
|
|
8
75
|
export interface IDateConstraints {
|
|
9
76
|
earliest: string | null;
|
|
10
77
|
latest: string | null;
|