@oslokommune/punkt-elements 12.31.2 → 12.32.0
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/dist/{alert-BDxxRqgi.cjs → alert-D5G5UJuo.cjs} +1 -1
- package/dist/{alert-D0S57u0r.js → alert-gERpVuB7.js} +6 -6
- package/dist/alert.d.ts +32 -0
- package/dist/{backlink-CzpB-ih9.js → backlink-DdNgqA56.js} +2 -2
- package/dist/{backlink-Dn4DfWVR.cjs → backlink-Q2HTG9jm.cjs} +1 -1
- package/dist/backlink.d.ts +32 -0
- package/dist/{button-Beo3c7cx.cjs → button-BPyZeW73.cjs} +1 -1
- package/dist/{button-9NwGr-OS.js → button-rArIL0-j.js} +3 -3
- package/dist/button.d.ts +32 -0
- package/dist/{calendar-BbZNxsKY.js → calendar-1ryAEdX3.js} +4 -4
- package/dist/{calendar-CxBo98iI.cjs → calendar-2DqPLXdD.cjs} +1 -1
- package/dist/calendar.d.ts +32 -0
- package/dist/{card-DQfNKnKl.js → card-BbMBpvJt.js} +7 -7
- package/dist/{card-C63x_nll.cjs → card-ZX09f_ka.cjs} +1 -1
- package/dist/card.d.ts +32 -0
- package/dist/{checkbox-9Zjy_NU7.cjs → checkbox-BnDG6wIO.cjs} +1 -1
- package/dist/{checkbox-CzDpR6_8.js → checkbox-Ceui2TLp.js} +4 -4
- package/dist/checkbox.d.ts +32 -0
- package/dist/{class-map-DWtqmIRS.js → class-map-ChuDQU5C.js} +1 -1
- package/dist/{class-map-Dj5mbCUg.cjs → class-map-D4rXyUxT.cjs} +1 -1
- package/dist/combobox-DH-YlbNh.cjs +115 -0
- package/dist/combobox-DbO6I0GT.js +694 -0
- package/dist/combobox.d.ts +47 -0
- package/dist/{datepicker-CYUvRGhE.js → datepicker-8MOgQsyL.js} +144 -196
- package/dist/datepicker-BRH-59Q9.cjs +153 -0
- package/dist/datepicker.d.ts +32 -0
- package/dist/directive-helpers-D7XIyCQ_.js +45 -0
- package/dist/directive-helpers-mGjAtADc.cjs +5 -0
- package/dist/{element-CzFXQBoS.cjs → element-BBo3JZk5.cjs} +1 -1
- package/dist/{element-C7XjZtLU.js → element-G8JoS0Lj.js} +6 -0
- package/dist/{helptext-B9kxDc2b.cjs → helptext-B4Uc-d56.cjs} +2 -2
- package/dist/{helptext-CqnoPodd.js → helptext-Y4cSgTkd.js} +10 -10
- package/dist/helptext.d.ts +32 -0
- package/dist/{icon-BEUgV9Wo.js → icon-BJnwW0eh.js} +1 -1
- package/dist/{icon-BOKusjAA.cjs → icon-BTUCDPN5.cjs} +1 -1
- package/dist/icon.d.ts +32 -0
- package/dist/{if-defined-CpIkv1A4.cjs → if-defined-C1ZDVzYn.cjs} +1 -1
- package/dist/{if-defined-eRX4e5zO.js → if-defined-rCqT8Od1.js} +1 -1
- package/dist/index.d.ts +208 -14
- package/dist/input-element-AhnBdCb8.cjs +1 -0
- package/dist/{input-element-BK8UkQli.js → input-element-DM2uSYaW.js} +22 -19
- package/dist/input-wrapper-BdZxmQyO.cjs +52 -0
- package/dist/input-wrapper-DQmYzhcy.js +185 -0
- package/dist/input-wrapper.d.ts +32 -0
- package/dist/{link-D3U0Jkz8.js → link-C3lW3z8X.js} +5 -5
- package/dist/{link-1iq0Pmuf.cjs → link-DOVlsg2S.cjs} +1 -1
- package/dist/link.d.ts +32 -0
- package/dist/{linkcard-CRpo3tiw.js → linkcard-CvqqyHVW.js} +4 -4
- package/dist/{linkcard-2WzDJPZz.cjs → linkcard-DDD92XfD.cjs} +1 -1
- package/dist/linkcard.d.ts +32 -0
- package/dist/listbox-BTVnrHWv.cjs +95 -0
- package/dist/listbox-DX-Euxdm.js +360 -0
- package/dist/listbox.d.ts +47 -0
- package/dist/{loader-B1edLWTg.js → loader-BudoV0yd.js} +6 -6
- package/dist/{loader-DI74pe25.cjs → loader-Csq0Yd1k.cjs} +1 -1
- package/dist/loader.d.ts +32 -0
- package/dist/{messagebox-DQpEMkS2.cjs → messagebox-8GwnNqb0.cjs} +1 -1
- package/dist/{messagebox-KP-8-tA9.js → messagebox-D6uexEhg.js} +6 -6
- package/dist/messagebox.d.ts +32 -0
- package/dist/{modal-ytIJwfr3.cjs → modal-CLixB4Dz.cjs} +1 -1
- package/dist/{modal-kPX8nO_L.js → modal-DnYn2Rlg.js} +6 -6
- package/dist/modal.d.ts +32 -0
- package/dist/pkt-alert.cjs +1 -1
- package/dist/pkt-alert.js +1 -1
- package/dist/pkt-backlink.cjs +1 -1
- package/dist/pkt-backlink.js +1 -1
- package/dist/pkt-button.cjs +1 -1
- package/dist/pkt-button.js +1 -1
- package/dist/pkt-calendar.cjs +1 -1
- package/dist/pkt-calendar.js +1 -1
- package/dist/pkt-card.cjs +1 -1
- package/dist/pkt-card.js +1 -1
- package/dist/pkt-checkbox.cjs +1 -1
- package/dist/pkt-checkbox.js +1 -1
- package/dist/pkt-combobox.cjs +1 -0
- package/dist/pkt-combobox.js +6 -0
- package/dist/pkt-datepicker.cjs +1 -1
- package/dist/pkt-datepicker.js +1 -1
- package/dist/pkt-helptext.cjs +1 -1
- package/dist/pkt-helptext.js +1 -1
- package/dist/pkt-icon.cjs +1 -1
- package/dist/pkt-icon.js +1 -1
- package/dist/pkt-index.cjs +3 -3
- package/dist/pkt-index.js +45 -43
- package/dist/pkt-input-wrapper.cjs +1 -1
- package/dist/pkt-input-wrapper.js +1 -1
- package/dist/pkt-link.cjs +1 -1
- package/dist/pkt-link.js +1 -1
- package/dist/pkt-linkcard.cjs +1 -1
- package/dist/pkt-linkcard.js +1 -1
- package/dist/pkt-listbox.cjs +1 -0
- package/dist/pkt-listbox.js +6 -0
- package/dist/pkt-loader.cjs +1 -1
- package/dist/pkt-loader.js +1 -1
- package/dist/pkt-messagebox.cjs +1 -1
- package/dist/pkt-messagebox.js +1 -1
- package/dist/pkt-modal.cjs +1 -1
- package/dist/pkt-modal.js +1 -1
- package/dist/pkt-options-controller-BtU1zEtG.cjs +1 -0
- package/dist/pkt-options-controller-CZplGTgu.js +38 -0
- package/dist/pkt-progressbar.cjs +1 -1
- package/dist/pkt-progressbar.js +2 -2
- 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-slot-controller-CqNvEpFd.cjs +1 -0
- package/dist/{pkt-slot-controller-Clbye6cM.js → pkt-slot-controller-D1DakVrU.js} +17 -7
- package/dist/pkt-tag.cjs +1 -1
- package/dist/pkt-tag.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/{progressbar-B6A9UVXS.cjs → progressbar-BW_icNId.cjs} +1 -1
- package/dist/{progressbar-D0nxLqHu.js → progressbar-czvExwTL.js} +5 -5
- package/dist/progressbar.d.ts +32 -0
- package/dist/{radiobutton-BWyQgR_x.cjs → radiobutton-BeSuCrbp.cjs} +1 -1
- package/dist/{radiobutton-DLWjvLBO.js → radiobutton-DKo27Stm.js} +5 -5
- package/dist/radiobutton.d.ts +32 -0
- package/dist/ref-DsoUUoPU.cjs +9 -0
- package/dist/ref-cRTOoM4R.js +102 -0
- package/dist/repeat-CArTw6-s.js +61 -0
- package/dist/repeat-kruY8poV.cjs +5 -0
- package/dist/select-DxHhPEgD.js +118 -0
- package/dist/select-lvFnhEVg.cjs +49 -0
- package/dist/select.d.ts +32 -0
- package/dist/{state-HNj0_316.cjs → state-BILlRnrD.cjs} +1 -1
- package/dist/{state-CDQk0DFQ.js → state-gfUuUqVg.js} +1 -1
- package/dist/{tag-CmFcSdOV.js → tag-CWx1XsGR.js} +7 -7
- package/dist/{tag-BeLSOjNh.cjs → tag-DThwKsrg.cjs} +1 -1
- package/dist/tag.d.ts +32 -0
- package/dist/{textarea-BPqWCymU.js → textarea-BNNDbxxO.js} +18 -17
- package/dist/{textarea-VG-UTMLP.cjs → textarea-CDsLbogK.cjs} +6 -6
- package/dist/textarea.d.ts +32 -0
- package/dist/{textinput-CEP7QA3E.cjs → textinput-C3C088Ki.cjs} +5 -4
- package/dist/{textinput-VD74aGzx.js → textinput-M8I4dfoP.js} +25 -24
- package/dist/textinput.d.ts +32 -0
- package/package.json +3 -3
- package/src/components/combobox/combobox.ts +873 -0
- package/src/components/combobox/countrycodes.json +927 -0
- package/src/components/combobox/index.ts +6 -0
- package/src/components/datepicker/datepicker.ts +2 -0
- package/src/components/helptext/helptext.ts +1 -1
- package/src/components/index.ts +7 -0
- package/src/components/input-wrapper/input-wrapper.ts +42 -34
- package/src/components/listbox/index.ts +4 -0
- package/src/components/listbox/listbox.ts +474 -0
- package/src/components/select/select.ts +7 -0
- package/src/components/textinput/textinput.ts +3 -2
- package/dist/datepicker-FuAL0uNU.cjs +0 -155
- package/dist/input-element-Dtyuf6s8.cjs +0 -1
- package/dist/input-wrapper-Bo2_t6pA.cjs +0 -50
- package/dist/input-wrapper-DaZZq8c0.js +0 -172
- package/dist/pkt-slot-controller-Oc32unDk.cjs +0 -1
- package/dist/ref-2anvRHT4.cjs +0 -13
- package/dist/ref-DbOSDQbk.js +0 -143
- package/dist/select-CzuxXKll.js +0 -150
- package/dist/select-DZL6aa2s.cjs +0 -48
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"use strict";const h=require("./class-map-D4rXyUxT.cjs"),d=require("./if-defined-C1ZDVzYn.cjs"),a=require("./element-BBo3JZk5.cjs"),m=require("./state-BILlRnrD.cjs"),o=require("./calendar-2DqPLXdD.cjs"),k=require("./input-element-AhnBdCb8.cjs"),l=require("./ref-DsoUUoPU.cjs"),v=require("./repeat-kruY8poV.cjs");require("./icon-BTUCDPN5.cjs");require("./input-wrapper-BdZxmQyO.cjs");require("./tag-DThwKsrg.cjs");const y=require("./pkt-slot-controller-CqNvEpFd.cjs"),$="pkt-datepicker",b=!0,x={name:{type:"string",name:"Navn",description:"Navn som sendes brukes i skjema ved innsending"},label:{type:"string",name:"Etikett",description:"Tekst som vises over datovelgeren"},helptext:{type:"string",name:"Hjelpetekst",description:"Hjelpetekst som vises over datovelgeren"},helptextDropdown:{type:"string",name:"Utvidet hjelpetekst",description:"Hjelpetekst som vises i en lukket boks man kan åpne"},helptextDropdownButton:{type:"string",name:"Knappetekst for hjelpetekst",description:"Tekst som vises på knappen for å åpne/lukke utvidet hjelpetekst",default:"Les mer"},dateformat:{name:"Datoformat",description:"Datoformat for valgte datoer i flervalgsmodus",type:"string",default:"dd.MM.yyyy"},currentmonth:{name:"Nåværende måned",type:"ISOdatestring",description:"Måneden som skal vises i datovelgeren"},value:{name:"Verdi",type:"ISOdatestring",variant:"multiple",reflect:!0,description:"Kommaseparert liste av valgte datoer"},excludeweekdays:{name:"Utelat ukedager",type:"string",description:"Kommaseparert liste over ukedager (1-7) som skal ekskluderes"},excludedates:{name:"Utelat datoer",type:"ISOdatestring",variant:"multiple",description:"Kommaseparert liste over datoer som skal ekskluderes"},min:{name:"Tidligst tillatt",type:"ISOdatestring",default:null,description:"Første tillate dato i datovelgeren"},max:{name:"Senest tillatt",type:"ISOdatestring",default:null,description:"Siste tillate dato i datovelgeren"},weeknumbers:{name:"Vis ukenummer",type:"boolean",reflect:!0,default:!1,description:"Vis ukedager i datovelgerens kalender"},withcontrols:{name:"Med kontroller",type:"boolean",reflect:!0,default:!1,description:"Vis avanserte velgere for måned og år"},multiple:{name:"Flervalg",type:"boolean",reflect:!0,default:!1,description:"Tillat valg av flere enn én dato i samme velger"},maxlength:{name:"Maks antall",description:"Maks valgte datoer i flervalgsmodus",type:"number"},range:{name:"Datotidsrom",type:"boolean",reflect:!0,default:!1,description:"Tillat å velge et tidsrom mellom to datoer i samme velger"},hasError:{type:"boolean",name:"Feil",default:!1,description:"Viser feiltilstand for datovelgeren"},errorMessage:{type:"string",name:"Feilmelding",description:"Tekst som vises under datovelgeren ved feiltilstand"},disabled:{type:"boolean",name:"Deaktivert",default:!1,reflect:!0,description:"Er datovelgeren deaktivert?"},fullwidth:{type:"boolean",name:"Full bredde",default:!1,reflect:!0,description:"Skal datovelgeren ta opp hele bredden?"},required:{type:"boolean",name:"Påkrevd",default:!1,reflect:!0,description:"Er datovelgeren påkrevd?"},requiredTag:{type:"boolean",name:"Vise påkrevd-merking",default:!1,description:"Viser en merking som indikerer at datovelgeren er påkrevd"},requiredText:{type:"string",name:"Påkrevd-tekst",default:"Må fylles ut",description:"Tekst som vises i påkrevd-merkingen"},optionalTag:{type:"boolean",name:"Vise valgfritt-merking",default:!1,description:"Viser en merking som indikerer at datovelgeren er valgfri"},optionalText:{type:"string",name:"Valgfritt-tekst",default:"Valgfritt",description:"Tekst som vises i valgfritt-merkingen"},useWrapper:{type:"boolean",name:"Bruk wrapper",description:"Indikerer at feltet skal ha synlig label og hjelpetekst",displayAsFalse:!0,default:!0},id:{type:"string",name:"ID",description:"Unik identifikasjon for datovelgeren"}},w={change:{type:"Event",description:"Returnerer valgt dato som streng i ISO-format"},"value-change":{type:"CustomEvent",description:"Returnerer en <code>array</code> med valgte datoer i ISO-format"},toggleHelpText:{type:"CustomEvent",description:"Returnerer <code>event.detail { isOpen: true }</code> eller <code>event.detail { isOpen: false }</code> når hjelpeteksten åpnes eller lukkes"}},u={name:$,"css-class":"pkt-datepicker",isElement:b,props:x,events:w};var D=Object.defineProperty,R=Object.getOwnPropertyDescriptor,s=(c,e,t,i)=>{for(var r=i>1?void 0:i?R(e,t):e,n=c.length-1,p;n>=0;n--)(p=c[n])&&(r=(i?p(e,t,r):p(r))||r);return i&&r&&D(e,t,r),r};const g=c=>new Promise(e=>setTimeout(e,c));exports.PktDatepicker=class extends k.PktInputElement{constructor(){super(),this.value="",this._value=this.value?Array.isArray(this.value)?this.value:this.value.split(","):[],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.calendarOpen=!1,this.timezone="Europe/Oslo",this.inputClasses={},this.buttonClasses={},this.inputRef=l.e(),this.inputRefTo=l.e(),this.btnRef=l.e(),this.calRef=l.e(),this.popupRef=l.e(),this.helptextSlot=l.e(),this.addToSelected=e=>{const t=e.target;if(!t.value)return;const i=this.min?o.newDate(this.min):null,r=this.max?o.newDate(this.max):null,n=o.newDate(t.value.split(",")[0]);n&&!isNaN(n.getTime())&&(!i||n>=i)&&(!r||n<=r)&&this.calRef.value&&this.calRef.value.handleDateSelect(n),t.value=""},this.slotController=new y.PktSlotController(this,this.helptextSlot)}async connectedCallback(){super.connectedCallback(),this.isMobileSafari=/iP(ad|od|hone)/i.test(window.navigator.userAgent)&&!!navigator.userAgent.match(/Version\/[\d\.]+.*Safari/),this.inputType=this.isMobileSafari?"text":"date",document&&document.body.addEventListener("click",e=>{var t,i;(t=this.inputRef)!=null&&t.value&&((i=this.btnRef)!=null&&i.value)&&!this.inputRef.value.contains(e.target)&&!(this.inputRefTo.value&&this.inputRefTo.value.contains(e.target))&&!this.btnRef.value.contains(e.target)&&!e.target.closest(".pkt-calendar-popup")&&this.calendarOpen&&(this.onBlur(),this.hideCalendar())}),this.value.length&&this._value.length===0&&(this._value=Array.isArray(this.value)?this.value:this.value.split(",")),this.min=this.min||u.props.min.default,this.max=this.max||u.props.max.default,typeof this.excludedates=="string"&&(this.excludedates=this.excludedates.split(",")),typeof this.excludeweekdays=="string"&&(this.excludeweekdays=this.excludeweekdays.split(",")),(this.multiple||this.range)&&this.name&&!this.name.endsWith("[]")&&(this.name=this.name+"[]"),this.calendarOpen&&(await g(20),this.handleCalendarPosition())}disconnectedCallback(){super.disconnectedCallback(),document&&document.body.removeEventListener("click",e=>{var t,i;(t=this.inputRef)!=null&&t.value&&((i=this.btnRef)!=null&&i.value)&&!this.inputRef.value.contains(e.target)&&!this.btnRef.value.contains(e.target)&&this.hideCalendar()})}attributeChangedCallback(e,t,i){if(e==="value"){if(this.range&&(i==null?void 0:i.split(",").length)===1)return;this.value!==t&&this.valueChanged(i,t)}e==="excludedates"&&typeof this.excludedates=="string"&&(this.excludedates=(i==null?void 0:i.split(","))??[]),e==="excludeweekdays"&&typeof this.excludeweekdays=="string"&&(this.excludeweekdays=(i==null?void 0:i.split(","))??[]),super.attributeChangedCallback(e,t,i)}updated(e){if(e.has("value")){if(this.range&&this.value.length===1)return;this.valueChanged(this.value,e.get("value"))}super.updated(e)}renderInput(){return a.x`
|
|
2
|
+
<input
|
|
3
|
+
class="${h.e(this.inputClasses)}"
|
|
4
|
+
.type=${this.inputType}
|
|
5
|
+
id="${this.id}-input"
|
|
6
|
+
.value=${this._value[0]??""}
|
|
7
|
+
min=${d.o(this.min)}
|
|
8
|
+
max=${d.o(this.max)}
|
|
9
|
+
@click=${e=>{e.preventDefault(),this.showCalendar()}}
|
|
10
|
+
?disabled=${this.disabled}
|
|
11
|
+
@keydown=${e=>{var t;(e.key===","||e.key==="Enter")&&((t=this.inputRef.value)==null||t.blur()),(e.key==="Space"||e.key===" ")&&(e.preventDefault(),this.toggleCalendar(e))}}
|
|
12
|
+
@input=${e=>{this.onInput(),e.stopImmediatePropagation()}}
|
|
13
|
+
@focus=${()=>{this.onFocus(),this.isMobileSafari&&this.showCalendar()}}
|
|
14
|
+
@blur=${e=>{var t;(t=this.calRef.value)!=null&&t.contains(e.relatedTarget)||this.onBlur(),this.manageValidity(e.target),this.value=e.target.value}}
|
|
15
|
+
@change=${e=>{e.stopImmediatePropagation()}}
|
|
16
|
+
${l.n(this.inputRef)}
|
|
17
|
+
/>
|
|
18
|
+
`}renderRangeInput(){const e={"pkt-input-prefix":this.showRangeLabels,"pkt-hide":!this.showRangeLabels};return a.x`
|
|
19
|
+
${this.showRangeLabels?a.x` <div class="pkt-input-prefix">${this.strings.generic.from}</div> `:a.E}
|
|
20
|
+
<input
|
|
21
|
+
class=${h.e(this.inputClasses)}
|
|
22
|
+
.type=${this.inputType}
|
|
23
|
+
id="${this.id}-input"
|
|
24
|
+
.value=${this._value[0]??""}
|
|
25
|
+
min=${d.o(this.min)}
|
|
26
|
+
max=${d.o(this.max)}
|
|
27
|
+
?disabled=${this.disabled}
|
|
28
|
+
@click=${t=>{t.preventDefault(),this.showCalendar()}}
|
|
29
|
+
@keydown=${t=>{var i;(t.key===","||t.key==="Enter")&&((i=this.inputRef.value)==null||i.blur()),(t.key==="Space"||t.key===" ")&&(t.preventDefault(),this.toggleCalendar(t))}}
|
|
30
|
+
@input=${t=>{this.onInput(),t.stopImmediatePropagation()}}
|
|
31
|
+
@focus=${()=>{this.onFocus(),this.isMobileSafari&&this.showCalendar()}}
|
|
32
|
+
@blur=${t=>{var i,r;if(t.target.value){this.manageValidity(t.target);const n=o.fromISOToDate(t.target.value);n&&this._value[0]!==t.target.value&&this._value[1]&&(this.clearInputValue(),(r=(i=this.calRef)==null?void 0:i.value)==null||r.handleDateSelect(n))}else this._value[0]&&this.clearInputValue()}}
|
|
33
|
+
@change=${t=>{t.stopImmediatePropagation()}}
|
|
34
|
+
${l.n(this.inputRef)}
|
|
35
|
+
/>
|
|
36
|
+
<div class="${h.e(e)}" id="${this.id}-to-label">
|
|
37
|
+
${this.strings.generic.to}
|
|
38
|
+
</div>
|
|
39
|
+
${this.showRangeLabels?a.E:a.x` <div class="pkt-input-separator">–</div> `}
|
|
40
|
+
<input
|
|
41
|
+
class=${h.e(this.inputClasses)}
|
|
42
|
+
.type=${this.inputType}
|
|
43
|
+
id="${this.id}-to"
|
|
44
|
+
aria-labelledby="${this.id}-to-label"
|
|
45
|
+
.value=${this._value[1]??""}
|
|
46
|
+
min=${d.o(this.min)}
|
|
47
|
+
max=${d.o(this.max)}
|
|
48
|
+
?disabled=${this.disabled}
|
|
49
|
+
@click=${t=>{t.preventDefault(),this.showCalendar()}}
|
|
50
|
+
@keydown=${t=>{var i;(t.key===","||t.key==="Enter")&&((i=this.inputRefTo.value)==null||i.blur()),(t.key==="Space"||t.key===" ")&&(t.preventDefault(),this.toggleCalendar(t))}}
|
|
51
|
+
@input=${t=>{this.onInput(),t.stopImmediatePropagation()}}
|
|
52
|
+
@focus=${()=>{this.onFocus(),this.isMobileSafari&&this.showCalendar()}}
|
|
53
|
+
@blur=${t=>{var i,r,n;if((i=this.calRef.value)!=null&&i.contains(t.relatedTarget)||this.onBlur(),t.target.value){this.manageValidity(t.target);const p=t.target.value;this.min&&this.min>p?this.internals.setValidity({rangeUnderflow:!0},this.strings.forms.messages.rangeUnderflow,t.target):this.max&&this.max<p&&this.internals.setValidity({rangeOverflow:!0},this.strings.forms.messages.rangeOverflow,t.target);const f=o.fromISOToDate(t.target.value);f&&this._value[1]!==o.formatISODate(f)&&((n=(r=this.calRef)==null?void 0:r.value)==null||n.handleDateSelect(f))}}}
|
|
54
|
+
@change=${t=>{t.stopImmediatePropagation()}}
|
|
55
|
+
${l.n(this.inputRefTo)}
|
|
56
|
+
/>
|
|
57
|
+
`}renderMultipleInput(){return a.x`
|
|
58
|
+
<input
|
|
59
|
+
class=${h.e(this.inputClasses)}
|
|
60
|
+
.type=${this.inputType}
|
|
61
|
+
id="${this.id}-input"
|
|
62
|
+
min=${d.o(this.min)}
|
|
63
|
+
max=${d.o(this.max)}
|
|
64
|
+
?disabled=${this.disabled||this.maxlength&&this._value.length>=this.maxlength}
|
|
65
|
+
@click=${e=>{e.preventDefault(),this.showCalendar()}}
|
|
66
|
+
@blur=${e=>{var t;(t=this.calRef.value)!=null&&t.contains(e.relatedTarget)||this.onBlur(),this.addToSelected(e)}}
|
|
67
|
+
@input=${e=>{this.onInput(),e.stopImmediatePropagation()}}
|
|
68
|
+
@focus=${()=>{this.onFocus(),this.isMobileSafari&&this.showCalendar()}}
|
|
69
|
+
@keydown=${e=>{(e.key===","||e.key==="Enter")&&(e.preventDefault(),this.addToSelected(e)),(e.key==="Space"||e.key===" ")&&(e.preventDefault(),this.toggleCalendar(e))}}
|
|
70
|
+
@change=${e=>{e.stopImmediatePropagation()}}
|
|
71
|
+
${l.n(this.inputRef)}
|
|
72
|
+
/>
|
|
73
|
+
`}renderTags(){return a.x`
|
|
74
|
+
<div class="pkt-datepicker__tags" aria-live="polite">
|
|
75
|
+
${this._value[0]?v.c(this._value??[],e=>e,e=>a.x`
|
|
76
|
+
<pkt-tag
|
|
77
|
+
.id="${this.id+e+"-tag"}"
|
|
78
|
+
closeTag
|
|
79
|
+
ariaLabel="${this.strings.calendar.deleteDate} ${o.fromISOtoLocal(e,this.dateformat)}"
|
|
80
|
+
@close=${()=>{var t;return(t=this.calRef.value)==null?void 0:t.handleDateSelect(o.fromISOToDate(e))}}
|
|
81
|
+
><time datetime="${e}">${o.fromISOtoLocal(e,this.dateformat)}</time></pkt-tag
|
|
82
|
+
>
|
|
83
|
+
`):a.E}
|
|
84
|
+
</div>
|
|
85
|
+
`}renderCalendar(){return a.x`<div
|
|
86
|
+
class="pkt-calendar-popup pkt-${this.calendarOpen?"show":"hide"}"
|
|
87
|
+
@focusout=${e=>{this.calendarOpen&&this.handleFocusOut(e)}}
|
|
88
|
+
id="${this.id}-popup"
|
|
89
|
+
${l.n(this.popupRef)}
|
|
90
|
+
>
|
|
91
|
+
<pkt-calendar
|
|
92
|
+
id="${this.id}-calendar"
|
|
93
|
+
?multiple=${this.multiple}
|
|
94
|
+
?range=${this.range}
|
|
95
|
+
?weeknumbers=${this.weeknumbers}
|
|
96
|
+
?withcontrols=${this.withcontrols}
|
|
97
|
+
.maxMultiple=${this.maxlength}
|
|
98
|
+
.selected=${this._value}
|
|
99
|
+
.earliest=${this.min}
|
|
100
|
+
.latest=${this.max}
|
|
101
|
+
.excludedates=${Array.isArray(this.excludedates)?this.excludedates:this.excludedates.split(",")}
|
|
102
|
+
.excludeweekdays=${this.excludeweekdays}
|
|
103
|
+
.currentmonth=${this.currentmonth?o.newDate(this.currentmonth):null}
|
|
104
|
+
@date-selected=${e=>{this.value=!this.multiple&&!this.range?e.detail[0]:e.detail,this._value=e.detail,this.inputRef.value&&(this.range&&this.inputRefTo.value?(this.inputRef.value.value=this._value[0]??"",this.inputRefTo.value.value=this._value[1]??""):this.multiple||(this.inputRef.value.value=this._value.length?this._value[0]:""))}}
|
|
105
|
+
@close=${()=>{this.onBlur(),this.hideCalendar()}}
|
|
106
|
+
${l.n(this.calRef)}
|
|
107
|
+
></pkt-calendar>
|
|
108
|
+
</div>`}render(){return this.inputClasses={"pkt-input":!0,"pkt-datepicker__input":!0,"pkt-input--fullwidth":this.fullwidth,"pkt-datepicker--hasrangelabels":this.showRangeLabels,"pkt-datepicker--multiple":this.multiple,"pkt-datepicker--range":this.range},this.buttonClasses={"pkt-input-icon":!0,"pkt-btn":!0,"pkt-btn--icon-only":!0,"pkt-btn--tertiary":!0},a.x`
|
|
109
|
+
<pkt-input-wrapper
|
|
110
|
+
label="${this.label}"
|
|
111
|
+
forId="${this.id}-input"
|
|
112
|
+
?counter=${this.multiple&&!!this.maxlength}
|
|
113
|
+
.counterCurrent=${this.value?this._value.length:0}
|
|
114
|
+
.counterMaxLength=${this.maxlength}
|
|
115
|
+
?disabled=${this.disabled}
|
|
116
|
+
?hasError=${this.hasError}
|
|
117
|
+
?hasFieldset=${this.hasFieldset}
|
|
118
|
+
?inline=${this.inline}
|
|
119
|
+
?required=${this.required}
|
|
120
|
+
?optionalTag=${this.optionalTag}
|
|
121
|
+
?requiredTag=${this.requiredTag}
|
|
122
|
+
?useWrapper=${this.useWrapper}
|
|
123
|
+
.optionalText=${this.optionalText}
|
|
124
|
+
.requiredText=${this.requiredText}
|
|
125
|
+
.errorMessage=${this.errorMessage}
|
|
126
|
+
.helptext=${this.helptext}
|
|
127
|
+
.helptextDropdown=${this.helptextDropdown}
|
|
128
|
+
.helptextDropdownButton=${this.helptextDropdownButton}
|
|
129
|
+
.ariaDescribedBy=${this.ariaDescribedBy}
|
|
130
|
+
class="pkt-datepicker"
|
|
131
|
+
>
|
|
132
|
+
<div class="pkt-contents" ${l.n(this.helptextSlot)} name="helptext" slot="helptext"></div>
|
|
133
|
+
${this.multiple?this.renderTags():a.E}
|
|
134
|
+
<div
|
|
135
|
+
class="pkt-datepicker__inputs ${this.range&&this.showRangeLabels?"pkt-input__range-inputs":""}"
|
|
136
|
+
>
|
|
137
|
+
<div class="pkt-input__container">
|
|
138
|
+
${this.range?this.renderRangeInput():this.multiple?this.renderMultipleInput():this.renderInput()}
|
|
139
|
+
<button
|
|
140
|
+
class="${h.e(this.buttonClasses)}"
|
|
141
|
+
type="button"
|
|
142
|
+
@click=${this.toggleCalendar}
|
|
143
|
+
?disabled=${this.disabled}
|
|
144
|
+
${l.n(this.btnRef)}
|
|
145
|
+
>
|
|
146
|
+
<pkt-icon name="calendar"></pkt-icon>
|
|
147
|
+
<span class="pkt-btn__text">${this.strings.calendar.buttonAltText}</span>
|
|
148
|
+
</button>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
</pkt-input-wrapper>
|
|
152
|
+
${this.renderCalendar()}
|
|
153
|
+
`}handleCalendarPosition(){var e;if(this.popupRef.value&&this.inputRef.value){const t=this.multiple&&!!this.maxlength,i=((e=this.inputRef.value.parentElement)==null?void 0:e.getBoundingClientRect())||this.inputRef.value.getBoundingClientRect(),r=t?i.height+30:i.height,n=this.popupRef.value.getBoundingClientRect().height;let p=t?"calc(100% - 30px)":"100%";i&&i.top+n>window.innerHeight&&i.top-n>0&&(p=`calc(100% - ${r}px - ${n}px)`),this.popupRef.value.style.top=p}}handleFocusOut(e){this.contains(e.target)||(this.onBlur(),this.hideCalendar())}async showCalendar(){var e;this.calendarOpen=!0,await g(20),this.handleCalendarPosition(),this.isMobileSafari&&((e=this.calRef.value)==null||e.focusOnCurrentDate())}hideCalendar(){this.calendarOpen=!1}async toggleCalendar(e){e.preventDefault(),this.calendarOpen?this.hideCalendar():this.showCalendar()}};s([a.n({type:String,reflect:!0})],exports.PktDatepicker.prototype,"value",2);s([a.n({type:Array})],exports.PktDatepicker.prototype,"_value",2);s([a.n({type:String,reflect:!0})],exports.PktDatepicker.prototype,"label",2);s([a.n({type:String})],exports.PktDatepicker.prototype,"dateformat",2);s([a.n({type:Boolean,reflect:!0})],exports.PktDatepicker.prototype,"multiple",2);s([a.n({type:Number,reflect:!0})],exports.PktDatepicker.prototype,"maxlength",2);s([a.n({type:Boolean,reflect:!0})],exports.PktDatepicker.prototype,"range",2);s([a.n({type:Boolean})],exports.PktDatepicker.prototype,"showRangeLabels",2);s([a.n({type:String,reflect:!0})],exports.PktDatepicker.prototype,"min",2);s([a.n({type:String,reflect:!0})],exports.PktDatepicker.prototype,"max",2);s([a.n({type:Boolean})],exports.PktDatepicker.prototype,"weeknumbers",2);s([a.n({type:Boolean,reflect:!0})],exports.PktDatepicker.prototype,"withcontrols",2);s([a.n({converter:o.converters.csvToArray})],exports.PktDatepicker.prototype,"excludedates",2);s([a.n({converter:o.converters.csvToArray})],exports.PktDatepicker.prototype,"excludeweekdays",2);s([a.n({type:String})],exports.PktDatepicker.prototype,"currentmonth",2);s([a.n({type:Boolean,reflect:!0})],exports.PktDatepicker.prototype,"calendarOpen",2);s([a.n({type:String})],exports.PktDatepicker.prototype,"timezone",2);s([m.r()],exports.PktDatepicker.prototype,"inputClasses",2);s([m.r()],exports.PktDatepicker.prototype,"buttonClasses",2);exports.PktDatepicker=s([a.t("pkt-datepicker")],exports.PktDatepicker);
|
package/dist/datepicker.d.ts
CHANGED
|
@@ -1,6 +1,31 @@
|
|
|
1
1
|
export { }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Pkt Select is a wrapper for the native select element using the pkt-input-wrapper component.
|
|
6
|
+
*
|
|
7
|
+
* The component will prioritize options passed as a prop over options passed as children if both are provided.
|
|
8
|
+
* This is to allow for dynamic options that might change in the case of both children/slot and props are provided.
|
|
9
|
+
*
|
|
10
|
+
* @slot (default) - Options to be rendered as children
|
|
11
|
+
* @prop {TSelectOption[]} options - Options to be rendered as children
|
|
12
|
+
*
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
declare global {
|
|
16
|
+
interface HTMLElementTagNameMap {
|
|
17
|
+
'pkt-select': PktSelect & HTMLSelectElement;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
declare global {
|
|
23
|
+
interface HTMLElementTagNameMap {
|
|
24
|
+
'pkt-combobox': PktCombobox & HTMLSelectElement;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
4
29
|
declare global {
|
|
5
30
|
interface HTMLElementTagNameMap {
|
|
6
31
|
'pkt-icon': PktIcon;
|
|
@@ -8,6 +33,13 @@ declare global {
|
|
|
8
33
|
}
|
|
9
34
|
|
|
10
35
|
|
|
36
|
+
declare global {
|
|
37
|
+
interface HTMLElementTagNameMap {
|
|
38
|
+
'pkt-listbox': PktListbox;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
11
43
|
declare global {
|
|
12
44
|
interface Window {
|
|
13
45
|
pktTz: string;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Z as l } from "./element-G8JoS0Lj.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2020 Google LLC
|
|
5
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
+
*/
|
|
7
|
+
const { I: m } = l, B = (t) => t.strings === void 0, c = () => document.createComment(""), g = (t, i, e) => {
|
|
8
|
+
var n;
|
|
9
|
+
const $ = t._$AA.parentNode, r = i === void 0 ? t._$AB : i._$AA;
|
|
10
|
+
if (e === void 0) {
|
|
11
|
+
const _ = $.insertBefore(c(), r), s = $.insertBefore(c(), r);
|
|
12
|
+
e = new m(_, s, t, t.options);
|
|
13
|
+
} else {
|
|
14
|
+
const _ = e._$AB.nextSibling, s = e._$AM, o = s !== t;
|
|
15
|
+
if (o) {
|
|
16
|
+
let A;
|
|
17
|
+
(n = e._$AQ) == null || n.call(e, t), e._$AM = t, e._$AP !== void 0 && (A = t._$AU) !== s._$AU && e._$AP(A);
|
|
18
|
+
}
|
|
19
|
+
if (_ !== r || o) {
|
|
20
|
+
let A = e._$AA;
|
|
21
|
+
for (; A !== _; ) {
|
|
22
|
+
const f = A.nextSibling;
|
|
23
|
+
$.insertBefore(A, r), A = f;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return e;
|
|
28
|
+
}, p = (t, i, e = t) => (t._$AI(i, e), t), d = {}, x = (t, i = d) => t._$AH = i, b = (t) => t._$AH, S = (t) => {
|
|
29
|
+
var $;
|
|
30
|
+
($ = t._$AP) == null || $.call(t, !1, !0);
|
|
31
|
+
let i = t._$AA;
|
|
32
|
+
const e = t._$AB.nextSibling;
|
|
33
|
+
for (; i !== e; ) {
|
|
34
|
+
const r = i.nextSibling;
|
|
35
|
+
i.remove(), i = r;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
export {
|
|
39
|
+
S as M,
|
|
40
|
+
B as f,
|
|
41
|
+
x as m,
|
|
42
|
+
b as p,
|
|
43
|
+
g as r,
|
|
44
|
+
p as v
|
|
45
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";const o=require("./element-BBo3JZk5.cjs");/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2020 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/const{I:m}=o.Z,v=e=>e.strings===void 0,f=()=>document.createComment(""),d=(e,i,t)=>{var n;const r=e._$AA.parentNode,$=i===void 0?e._$AB:i._$AA;if(t===void 0){const s=r.insertBefore(f(),$),_=r.insertBefore(f(),$);t=new m(s,_,e,e.options)}else{const s=t._$AB.nextSibling,_=t._$AM,c=_!==e;if(c){let A;(n=t._$AQ)==null||n.call(t,e),t._$AM=e,t._$AP!==void 0&&(A=e._$AU)!==_._$AU&&t._$AP(A)}if(s!==$||c){let A=t._$AA;for(;A!==s;){const l=A.nextSibling;r.insertBefore(A,$),A=l}}}return t},B=(e,i,t=e)=>(e._$AI(i,t),e),g={},u=(e,i=g)=>e._$AH=i,b=e=>e._$AH,p=e=>{var r;(r=e._$AP)==null||r.call(e,!1,!0);let i=e._$AA;const t=e._$AB.nextSibling;for(;i!==t;){const $=i.nextSibling;i.remove(),i=$}};exports.M=p;exports.f=v;exports.m=u;exports.p=b;exports.r=d;exports.v=B;
|
|
@@ -235,4 +235,4 @@ Check the render method of %s.`,Ze(cn)||"Unknown"));var v=po(s,f);v.payload={ele
|
|
|
235
235
|
|
|
236
236
|
let root = createRoot(domContainer);
|
|
237
237
|
root.render(<App />);`),t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError),t.transitionCallbacks!==void 0&&t.transitionCallbacks);var f=q1(e,Ih,null,a,i,o,s);Fh(f.current,e);var p=e.nodeType===Dn?e.parentNode:e;return rp(p),new w0(f)}function qm(e){this._internalRoot=e}function Dk(e){e&&_y(e)}qm.prototype.unstable_scheduleHydration=Dk;function Ok(e,t,a){if(!Km(e))throw new Error("hydrateRoot(...): Target container is not a DOM element.");yT(e),t===void 0&&S("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var i=a??null,o=a!=null&&a.hydratedSources||null,s=!1,f=!1,p="",v=mT;a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(p=a.identifierPrefix),a.onRecoverableError!==void 0&&(v=a.onRecoverableError));var g=K1(t,null,e,Ih,i,s,f,p,v);if(Fh(g.current,e),rp(e),o)for(var C=0;C<o.length;C++){var x=o[C];Nb(g,x)}return new qm(g)}function Km(e){return!!(e&&(e.nodeType===Fr||e.nodeType===Ia||e.nodeType===Fl||!Q))}function Zp(e){return!!(e&&(e.nodeType===Fr||e.nodeType===Ia||e.nodeType===Fl||e.nodeType===Dn&&e.nodeValue===" react-mount-point-unstable "))}function yT(e){e.nodeType===Fr&&e.tagName&&e.tagName.toUpperCase()==="BODY"&&S("createRoot(): Creating roots directly with document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try using a container element created for your app."),vp(e)&&(e._reactRootContainer?S("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):S("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}var Mk=E.ReactCurrentOwner,gT;gT=function(e){if(e._reactRootContainer&&e.nodeType!==Dn){var t=Z1(e._reactRootContainer.current);t&&t.parentNode!==e&&S("render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container.")}var a=!!e._reactRootContainer,i=b0(e),o=!!(i&&Su(i));o&&!a&&S("render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render."),e.nodeType===Fr&&e.tagName&&e.tagName.toUpperCase()==="BODY"&&S("render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.")};function b0(e){return e?e.nodeType===Ia?e.documentElement:e.firstChild:null}function ST(){}function Lk(e,t,a,i,o){if(o){if(typeof i=="function"){var s=i;i=function(){var b=Gm(f);s.call(b)}}var f=K1(t,i,e,Cu,null,!1,!1,"",ST);e._reactRootContainer=f,Fh(f.current,e);var p=e.nodeType===Dn?e.parentNode:e;return rp(p),yo(),f}else{for(var v;v=e.lastChild;)e.removeChild(v);if(typeof i=="function"){var g=i;i=function(){var b=Gm(C);g.call(b)}}var C=q1(e,Cu,null,!1,!1,"",ST);e._reactRootContainer=C,Fh(C.current,e);var x=e.nodeType===Dn?e.parentNode:e;return rp(x),yo(function(){Xp(t,C,a,i)}),C}}function Ak(e,t){e!==null&&typeof e!="function"&&S("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e)}function Xm(e,t,a,i,o){gT(a),Ak(o===void 0?null:o,"render");var s=a._reactRootContainer,f;if(!s)f=Lk(a,t,e,o,i);else{if(f=s,typeof o=="function"){var p=o;o=function(){var v=Gm(f);p.call(v)}}Xp(t,f,e,o)}return Gm(f)}var ET=!1;function Nk(e){{ET||(ET=!0,S("findDOMNode is deprecated and will be removed in the next major release. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node"));var t=Mk.current;if(t!==null&&t.stateNode!==null){var a=t.stateNode._warnedAboutRefsInRender;a||S("%s is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",Et(t.type)||"A component"),t.stateNode._warnedAboutRefsInRender=!0}}return e==null?null:e.nodeType===Fr?e:gk(e,"findDOMNode")}function Uk(e,t,a){if(S("ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!Zp(t))throw new Error("Target container is not a DOM element.");{var i=vp(t)&&t._reactRootContainer===void 0;i&&S("You are calling ReactDOM.hydrate() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call hydrateRoot(container, element)?")}return Xm(null,e,t,!0,a)}function zk(e,t,a){if(S("ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!Zp(t))throw new Error("Target container is not a DOM element.");{var i=vp(t)&&t._reactRootContainer===void 0;i&&S("You are calling ReactDOM.render() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.render(element)?")}return Xm(null,e,t,!1,a)}function Fk(e,t,a,i){if(S("ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported in React 18. Consider using a portal instead. Until you switch to the createRoot API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!Zp(a))throw new Error("Target container is not a DOM element.");if(e==null||!ns(e))throw new Error("parentComponent must be a valid React Component");return Xm(e,t,a,!1,i)}var CT=!1;function Hk(e){if(CT||(CT=!0,S("unmountComponentAtNode is deprecated and will be removed in the next major release. Switch to the createRoot API. Learn more: https://reactjs.org/link/switch-to-createroot")),!Zp(e))throw new Error("unmountComponentAtNode(...): Target container is not a DOM element.");{var t=vp(e)&&e._reactRootContainer===void 0;t&&S("You are calling ReactDOM.unmountComponentAtNode() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?")}if(e._reactRootContainer){{var a=b0(e),i=a&&!Su(a);i&&S("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.")}return yo(function(){Xm(null,null,e,!1,function(){e._reactRootContainer=null,mE(e)})}),!0}else{{var o=b0(e),s=!!(o&&Su(o)),f=e.nodeType===Fr&&Zp(e.parentNode)&&!!e.parentNode._reactRootContainer;s&&S("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",f?"You may have accidentally passed in a React root node instead of its container.":"Instead, have the parent component update its state and rerender in order to remove this component.")}return!1}}iu(Sk),wy(Ek),Xc(Ck),ih(ba),lh(hr),(typeof Map!="function"||Map.prototype==null||typeof Map.prototype.forEach!="function"||typeof Set!="function"||Set.prototype==null||typeof Set.prototype.clear!="function"||typeof Set.prototype.forEach!="function")&&S("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),Uv(VR),vc(n0,Ox,yo);function $k(e,t){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!Km(t))throw new Error("Target container is not a DOM element.");return yk(e,t,null,a)}function Vk(e,t,a,i){return Fk(e,t,a,i)}var _0={usingClientEntryPoint:!1,Events:[Su,Cf,Hh,pc,Ju,n0]};function jk(e,t){return _0.usingClientEntryPoint||S('You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),kk(e,t)}function Pk(e,t,a){return _0.usingClientEntryPoint||S('You are importing hydrateRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),Ok(e,t,a)}function Bk(e){return k1()&&S("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."),yo(e)}var Ik=xk({findFiberByHostInstance:Ds,bundleType:1,version:S0,rendererPackageName:"react-dom"});if(!Ik&&nn&&window.top===window.self&&(navigator.userAgent.indexOf("Chrome")>-1&&navigator.userAgent.indexOf("Edge")===-1||navigator.userAgent.indexOf("Firefox")>-1)){var TT=window.location.protocol;/^(https?|file):$/.test(TT)&&console.info("%cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools"+(TT==="file:"?`
|
|
238
|
-
You might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq`:""),"font-weight:bold")}za.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=_0,za.createPortal=$k,za.createRoot=jk,za.findDOMNode=Nk,za.flushSync=Bk,za.hydrate=Uk,za.hydrateRoot=Pk,za.render=zk,za.unmountComponentAtNode=Hk,za.unstable_batchedUpdates=n0,za.unstable_renderSubtreeIntoContainer=Vk,za.version=S0,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),za}function tR(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function")){if(process.env.NODE_ENV!=="production")throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(tR)}catch(U){console.error(U)}}}process.env.NODE_ENV==="production"?(tR(),A0.exports=hD()):A0.exports=mD();var nR=A0.exports,N0,ey=nR;if(process.env.NODE_ENV==="production")N0=ey.createRoot,ey.hydrateRoot;else{var jT=ey.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;N0=function(U,y){jT.usingClientEntryPoint=!0;try{return ey.createRoot(U,y)}finally{jT.usingClientEntryPoint=!1}}}const yD=U=>{const y=document.createElement("div"),E=N0(y);return nR.flushSync(()=>{E.render(U)}),y.innerHTML},gD={hi:"Hei!"},SD={from:"Fra",to:"Til"},ED={buttonAltText:"Åpne kalender",deleteDate:"Fjern dato"},CD={month:"Måned",year:"År",days:["Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Søndag"],daysShort:["Man","Tir","Ons","Tor","Fre","Lør","Søn"],months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],week:"Uke",prevMonth:"Forrige måned",nextMonth:"Neste måned"},TD={labels:{optional:"Valgfritt",required:"Må fylles ut"},messages:{required:"Dette feltet er påkrevd",invalid:"Ugyldig verdi",invalidPattern:"Ugyldig format",tooShort:"For kort",tooLong:"For lang",rangeUnderflow:"For lav verdi",rangeOverflow:"For høy verdi",dateUnderflow:"For tidlig dato",dateOverflow:"For sen dato"},date:{multiple:"Her kan du velge flere datoer. Trykk komma eller enter når du har skrevet inn en dato."}},rR={example:gD,generic:SD,calendar:ED,dates:CD,forms:TD};(function(){(function(U){const y=new WeakMap,E=new WeakMap,O=new WeakMap,L=new WeakMap,q=new WeakMap,S=new WeakMap,He=new WeakMap,ee=new WeakMap,oe=new WeakMap,Ke=new WeakMap,re=new WeakMap,ge=new WeakMap,ue=new WeakMap,ze=new WeakMap,mt=new WeakMap,lt={ariaAtomic:"aria-atomic",ariaAutoComplete:"aria-autocomplete",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"},Vn=(P,k)=>{for(let j in lt){k[j]=null;let Z=null;const Pe=lt[j];Object.defineProperty(k,j,{get(){return Z},set(We){Z=We,P.isConnected?P.setAttribute(Pe,We):Ke.set(P,k)}})}};function Yt(P){const k=L.get(P),{form:j}=k;fe(P,j,k),vt(P,k.labels)}const Xe=(P,k=!1)=>{const j=document.createTreeWalker(P,NodeFilter.SHOW_ELEMENT,{acceptNode(We){return L.has(We)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});let Z=j.nextNode();const Pe=!k||P.disabled;for(;Z;)Z.formDisabledCallback&&Pe&&Nt(Z,P.disabled),Z=j.nextNode()},pt={attributes:!0,attributeFilter:["disabled","name"]},ke=tt()?new MutationObserver(P=>{for(const k of P){const j=k.target;if(k.attributeName==="disabled"&&(j.constructor.formAssociated?Nt(j,j.hasAttribute("disabled")):j.localName==="fieldset"&&Xe(j)),k.attributeName==="name"&&j.constructor.formAssociated){const Z=L.get(j),Pe=oe.get(j);Z.setFormValue(Pe)}}}):{};function it(P){P.forEach(k=>{const{addedNodes:j,removedNodes:Z}=k,Pe=Array.from(j),We=Array.from(Z);Pe.forEach(G=>{var he;if(L.has(G)&&G.constructor.formAssociated&&Yt(G),Ke.has(G)){const De=Ke.get(G);Object.keys(lt).filter(st=>De[st]!==null).forEach(st=>{G.setAttribute(lt[st],De[st])}),Ke.delete(G)}if(mt.has(G)){const De=mt.get(G);G.setAttribute("internals-valid",De.validity.valid.toString()),G.setAttribute("internals-invalid",(!De.validity.valid).toString()),G.setAttribute("aria-invalid",(!De.validity.valid).toString()),mt.delete(G)}if(G.localName==="form"){const De=ee.get(G),ut=document.createTreeWalker(G,NodeFilter.SHOW_ELEMENT,{acceptNode(un){return L.has(un)&&un.constructor.formAssociated&&!(De&&De.has(un))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});let st=ut.nextNode();for(;st;)Yt(st),st=ut.nextNode()}G.localName==="fieldset"&&((he=ke.observe)===null||he===void 0||he.call(ke,G,pt),Xe(G,!0))}),We.forEach(G=>{const he=L.get(G);he&&O.get(he)&&xt(he),He.has(G)&&He.get(G).disconnect()})})}function Ye(P){P.forEach(k=>{const{removedNodes:j}=k;j.forEach(Z=>{const Pe=ue.get(k.target);L.has(Z)&&Ie(Z),Pe.disconnect()})})}const qt=P=>{var k,j;const Z=new MutationObserver(Ye);!((k=window==null?void 0:window.ShadyDOM)===null||k===void 0)&&k.inUse&&P.mode&&P.host&&(P=P.host),(j=Z.observe)===null||j===void 0||j.call(Z,P,{childList:!0}),ue.set(P,Z)};tt()&&new MutationObserver(it);const vn={childList:!0,subtree:!0},Nt=(P,k)=>{P.toggleAttribute("internals-disabled",k),k?P.setAttribute("aria-disabled","true"):P.removeAttribute("aria-disabled"),P.formDisabledCallback&&P.formDisabledCallback.apply(P,[k])},xt=P=>{O.get(P).forEach(j=>{j.remove()}),O.set(P,[])},hn=(P,k)=>{const j=document.createElement("input");return j.type="hidden",j.name=P.getAttribute("name"),P.after(j),O.get(k).push(j),j},rt=(P,k)=>{var j;O.set(k,[]),(j=ke.observe)===null||j===void 0||j.call(ke,P,pt)},vt=(P,k)=>{if(k.length){Array.from(k).forEach(Z=>Z.addEventListener("click",P.click.bind(P)));let j=k[0].id;k[0].id||(j=`${k[0].htmlFor}_Label`,k[0].id=j),P.setAttribute("aria-labelledby",j)}},Ht=P=>{const k=Array.from(P.elements).filter(We=>!We.tagName.includes("-")&&We.validity).map(We=>We.validity.valid),j=ee.get(P)||[],Z=Array.from(j).filter(We=>We.isConnected).map(We=>L.get(We).validity.valid),Pe=[...k,...Z].includes(!1);P.toggleAttribute("internals-invalid",Pe),P.toggleAttribute("internals-valid",!Pe)},kt=P=>{Ht(D(P.target))},we=P=>{Ht(D(P.target))},le=P=>{const k=["button[type=submit]","input[type=submit]","button:not([type])"].map(j=>`${j}:not([disabled])`).map(j=>`${j}:not([form])${P.id?`,${j}[form='${P.id}']`:""}`).join(",");P.addEventListener("click",j=>{if(j.target.closest(k)){const Pe=ee.get(P);if(P.noValidate)return;Pe.size&&Array.from(Pe).reverse().map(he=>L.get(he).reportValidity()).includes(!1)&&j.preventDefault()}})},Le=P=>{const k=ee.get(P.target);k&&k.size&&k.forEach(j=>{j.constructor.formAssociated&&j.formResetCallback&&j.formResetCallback.apply(j)})},fe=(P,k,j)=>{if(k){const Z=ee.get(k);if(Z)Z.add(P);else{const Pe=new Set;Pe.add(P),ee.set(k,Pe),le(k),k.addEventListener("reset",Le),k.addEventListener("input",kt),k.addEventListener("change",we)}S.set(k,{ref:P,internals:j}),P.constructor.formAssociated&&P.formAssociatedCallback&&setTimeout(()=>{P.formAssociatedCallback.apply(P,[k])},0),Ht(k)}},D=P=>{let k=P.parentNode;return k&&k.tagName!=="FORM"&&(k=D(k)),k},Q=(P,k,j=DOMException)=>{if(!P.constructor.formAssociated)throw new j(k)},$e=(P,k,j)=>{const Z=ee.get(P);return Z&&Z.size&&Z.forEach(Pe=>{L.get(Pe)[j]()||(k=!1)}),k},Ie=P=>{if(P.constructor.formAssociated){const k=L.get(P),{labels:j,form:Z}=k;vt(P,j),fe(P,Z,k)}};function tt(){return typeof MutationObserver<"u"}class ot{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)}}const bt=P=>(P.badInput=!1,P.customError=!1,P.patternMismatch=!1,P.rangeOverflow=!1,P.rangeUnderflow=!1,P.stepMismatch=!1,P.tooLong=!1,P.tooShort=!1,P.typeMismatch=!1,P.valid=!0,P.valueMissing=!1,P),yt=(P,k,j)=>(P.valid=ht(k),Object.keys(k).forEach(Z=>P[Z]=k[Z]),j&&Ht(j),P),ht=P=>{let k=!0;for(let j in P)j!=="valid"&&P[j]!==!1&&(k=!1);return k},Kt=new WeakMap;function qn(P,k){P.toggleAttribute(k,!0),P.part&&P.part.add(k)}class yr extends Set{static get isPolyfilled(){return!0}constructor(k){if(super(),!k||!k.tagName||k.tagName.indexOf("-")===-1)throw new TypeError("Illegal constructor");Kt.set(this,k)}add(k){if(!/^--/.test(k)||typeof k!="string")throw new DOMException(`Failed to execute 'add' on 'CustomStateSet': The specified value ${k} must start with '--'.`);const j=super.add(k),Z=Kt.get(this),Pe=`state${k}`;return Z.isConnected?qn(Z,Pe):setTimeout(()=>{qn(Z,Pe)}),j}clear(){for(let[k]of this.entries())this.delete(k);super.clear()}delete(k){const j=super.delete(k),Z=Kt.get(this);return Z.isConnected?(Z.toggleAttribute(`state${k}`,!1),Z.part&&Z.part.remove(`state${k}`)):setTimeout(()=>{Z.toggleAttribute(`state${k}`,!1),Z.part&&Z.part.remove(`state${k}`)}),j}}function nn(P,k,j,Z){if(j==="a"&&!Z)throw new TypeError("Private accessor was defined without a getter");if(typeof k=="function"?P!==k||!Z:!k.has(P))throw new TypeError("Cannot read private member from an object whose class did not declare it");return j==="m"?Z:j==="a"?Z.call(P):Z?Z.value:k.get(P)}function jn(P,k,j,Z,Pe){if(typeof k=="function"?P!==k||!Pe:!k.has(P))throw new TypeError("Cannot write private member to an object whose class did not declare it");return k.set(P,j),j}var xn;class fr{constructor(k){xn.set(this,void 0),jn(this,xn,k);for(let j=0;j<k.length;j++){let Z=k[j];this[j]=Z,Z.hasAttribute("name")&&(this[Z.getAttribute("name")]=Z)}Object.freeze(this)}get length(){return nn(this,xn,"f").length}[(xn=new WeakMap,Symbol.iterator)](){return nn(this,xn,"f")[Symbol.iterator]()}item(k){return this[k]==null?null:this[k]}namedItem(k){return this[k]==null?null:this[k]}}function kn(){const P=HTMLFormElement.prototype.checkValidity;HTMLFormElement.prototype.checkValidity=j;const k=HTMLFormElement.prototype.reportValidity;HTMLFormElement.prototype.reportValidity=Z;function j(...We){let G=P.apply(this,We);return $e(this,G,"checkValidity")}function Z(...We){let G=k.apply(this,We);return $e(this,G,"reportValidity")}const{get:Pe}=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get(...We){const G=Pe.call(this,...We),he=Array.from(ee.get(this)||[]);if(he.length===0)return G;const De=Array.from(G).concat(he).sort((ut,st)=>ut.compareDocumentPosition?ut.compareDocumentPosition(st)&2?1:-1:0);return new fr(De)}})}class Mr{static get isPolyfilled(){return!0}constructor(k){if(!k||!k.tagName||k.tagName.indexOf("-")===-1)throw new TypeError("Illegal constructor");const j=k.getRootNode(),Z=new ot;this.states=new yr(k),y.set(this,k),E.set(this,Z),L.set(k,this),Vn(k,this),rt(k,this),Object.seal(this),j instanceof DocumentFragment&&qt(j)}checkValidity(){const k=y.get(this);if(Q(k,"Failed to execute 'checkValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const j=E.get(this);if(!j.valid){const Z=new Event("invalid",{bubbles:!1,cancelable:!0,composed:!1});k.dispatchEvent(Z)}return j.valid}get form(){const k=y.get(this);Q(k,"Failed to read the 'form' property from 'ElementInternals': The target element is not a form-associated custom element.");let j;return k.constructor.formAssociated===!0&&(j=D(k)),j}get labels(){const k=y.get(this);Q(k,"Failed to read the 'labels' property from 'ElementInternals': The target element is not a form-associated custom element.");const j=k.getAttribute("id"),Z=k.getRootNode();return Z&&j?Z.querySelectorAll(`[for="${j}"]`):[]}reportValidity(){const k=y.get(this);if(Q(k,"Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const j=this.checkValidity(),Z=ge.get(this);if(Z&&!k.constructor.formAssociated)throw new DOMException("Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.");return!j&&Z&&(k.focus(),Z.focus()),j}setFormValue(k){const j=y.get(this);if(Q(j,"Failed to execute 'setFormValue' on 'ElementInternals': The target element is not a form-associated custom element."),xt(this),k!=null&&!(k instanceof FormData)){if(j.getAttribute("name")){const Z=hn(j,this);Z.value=k}}else k!=null&&k instanceof FormData&&Array.from(k).reverse().forEach(([Z,Pe])=>{if(typeof Pe=="string"){const We=hn(j,this);We.name=Z,We.value=Pe}});oe.set(j,k)}setValidity(k,j,Z){const Pe=y.get(this);if(Q(Pe,"Failed to execute 'setValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!k)throw new TypeError("Failed to execute 'setValidity' on 'ElementInternals': 1 argument required, but only 0 present.");ge.set(this,Z);const We=E.get(this),G={};for(const ut in k)G[ut]=k[ut];Object.keys(G).length===0&&bt(We);const he=Object.assign(Object.assign({},We),G);delete he.valid;const{valid:De}=yt(We,he,this.form);if(!De&&!j)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.");q.set(this,De?"":j),Pe.isConnected?(Pe.toggleAttribute("internals-invalid",!De),Pe.toggleAttribute("internals-valid",De),Pe.setAttribute("aria-invalid",`${!De}`)):mt.set(Pe,this)}get shadowRoot(){const k=y.get(this),j=re.get(k);return j||null}get validationMessage(){const k=y.get(this);return Q(k,"Failed to read the 'validationMessage' property from 'ElementInternals': The target element is not a form-associated custom element."),q.get(this)}get validity(){const k=y.get(this);return Q(k,"Failed to read the 'validity' property from 'ElementInternals': The target element is not a form-associated custom element."),E.get(this)}get willValidate(){const k=y.get(this);return Q(k,"Failed to read the 'willValidate' property from 'ElementInternals': The target element is not a form-associated custom element."),!(k.disabled||k.hasAttribute("disabled")||k.hasAttribute("readonly"))}}function Fa(){if(typeof window>"u"||!window.ElementInternals||!HTMLElement.prototype.attachInternals)return!1;class P extends HTMLElement{constructor(){super(),this.internals=this.attachInternals()}}const k=`element-internals-feature-detection-${Math.random().toString(36).replace(/[^a-z]+/g,"")}`;customElements.define(k,P);const j=new P;return["shadowRoot","form","willValidate","validity","validationMessage","labels","setFormValue","setValidity","checkValidity","reportValidity"].every(Z=>Z in j.internals)}let An=!1,Kn=!1;function Lr(P){Kn||(Kn=!0,window.CustomStateSet=yr,P&&(HTMLElement.prototype.attachInternals=function(...k){const j=P.call(this,k);return j.states=new yr(this),j}))}function Xn(P=!0){if(!An){if(An=!0,typeof window<"u"&&(window.ElementInternals=Mr),typeof CustomElementRegistry<"u"){const k=CustomElementRegistry.prototype.define;CustomElementRegistry.prototype.define=function(j,Z,Pe){if(Z.formAssociated){const We=Z.prototype.connectedCallback;Z.prototype.connectedCallback=function(){ze.has(this)||(ze.set(this,!0),this.hasAttribute("disabled")&&Nt(this,!0)),We!=null&&We.apply(this),Ie(this)}}k.call(this,j,Z,Pe)}}if(typeof HTMLElement<"u"&&(HTMLElement.prototype.attachInternals=function(){if(this.tagName){if(this.tagName.indexOf("-")===-1)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': Unable to attach ElementInternals to non-custom elements.")}else return{};if(L.has(this))throw new DOMException("DOMException: Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");return new Mr(this)}),typeof Element<"u"){let k=function(...Z){const Pe=j.apply(this,Z);if(re.set(this,Pe),tt()){const We=new MutationObserver(it);window.ShadyDOM?We.observe(this,vn):We.observe(Pe,vn),He.set(this,We)}return Pe};const j=Element.prototype.attachShadow;Element.prototype.attachShadow=k}tt()&&typeof document<"u"&&new MutationObserver(it).observe(document.documentElement,vn),typeof HTMLFormElement<"u"&&kn(),(P||typeof window<"u"&&!window.CustomStateSet)&&Lr()}}return!!customElements.polyfillWrapFlushCallback||(Fa()?typeof window<"u"&&!window.CustomStateSet&&Lr(HTMLElement.prototype.attachInternals):Xn(!1)),U.forceCustomStateSetPolyfill=Lr,U.forceElementInternalsPolyfill=Xn,Object.defineProperty(U,"__esModule",{value:!0}),U})({})})();var RD=Object.defineProperty,aR=(U,y,E,O)=>{for(var L=void 0,q=U.length-1,S;q>=0;q--)(S=U[q])&&(L=S(y,E,L)||L);return L&&RD(y,E,L),L};class j0 extends av{constructor(){super(),this.strings=rR,this.role=null}connectedCallback(){super.connectedCallback()}createRenderRoot(){return this}hotReplacedCallback(){this.requestUpdate()}update(y){y.forEach((E,O)=>{typeof O=="string"&&this[O]&&typeof this[O]=="object"&&this[O].$$typeof&&(this[O]=yD(this[O]))}),super.update(y)}}aR([V0({type:Object})],j0.prototype,"strings");aR([V0({type:String})],j0.prototype,"role");exports.E=cr;exports.PktElement=j0;exports.T=Gs;exports.Z=Kk;exports.n=V0;exports.t=Zk;exports.translations=rR;exports.x=qk;
|
|
238
|
+
You might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq`:""),"font-weight:bold")}za.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=_0,za.createPortal=$k,za.createRoot=jk,za.findDOMNode=Nk,za.flushSync=Bk,za.hydrate=Uk,za.hydrateRoot=Pk,za.render=zk,za.unmountComponentAtNode=Hk,za.unstable_batchedUpdates=n0,za.unstable_renderSubtreeIntoContainer=Vk,za.version=S0,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),za}function tR(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function")){if(process.env.NODE_ENV!=="production")throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(tR)}catch(U){console.error(U)}}}process.env.NODE_ENV==="production"?(tR(),A0.exports=hD()):A0.exports=mD();var nR=A0.exports,N0,ey=nR;if(process.env.NODE_ENV==="production")N0=ey.createRoot,ey.hydrateRoot;else{var jT=ey.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;N0=function(U,y){jT.usingClientEntryPoint=!0;try{return ey.createRoot(U,y)}finally{jT.usingClientEntryPoint=!1}}}const yD=U=>{const y=document.createElement("div"),E=N0(y);return nR.flushSync(()=>{E.render(U)}),y.innerHTML},gD={hi:"Hei!"},SD={from:"Fra",to:"Til"},ED={buttonAltText:"Åpne kalender",deleteDate:"Fjern dato"},CD={month:"Måned",year:"År",days:["Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Søndag"],daysShort:["Man","Tir","Ons","Tor","Fre","Lør","Søn"],months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],week:"Uke",prevMonth:"Forrige måned",nextMonth:"Neste måned"},TD={search:{placeholder:"Søk…"},labels:{optional:"Valgfritt",required:"Må fylles ut"},messages:{required:"Dette feltet er påkrevd",invalid:"Ugyldig verdi",invalidPattern:"Ugyldig format",tooShort:"For kort",tooLong:"For lang",rangeUnderflow:"For lav verdi",rangeOverflow:"For høy verdi",dateUnderflow:"For tidlig dato",dateOverflow:"For sen dato"},helptext:{helptextDropdownButton:"Les mer"},date:{multiple:"Her kan du velge flere datoer. Trykk komma eller enter når du har skrevet inn en dato."}},rR={example:gD,generic:SD,calendar:ED,dates:CD,forms:TD};(function(){(function(U){const y=new WeakMap,E=new WeakMap,O=new WeakMap,L=new WeakMap,q=new WeakMap,S=new WeakMap,He=new WeakMap,ee=new WeakMap,oe=new WeakMap,Ke=new WeakMap,re=new WeakMap,ge=new WeakMap,ue=new WeakMap,ze=new WeakMap,mt=new WeakMap,lt={ariaAtomic:"aria-atomic",ariaAutoComplete:"aria-autocomplete",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"},Vn=(P,k)=>{for(let j in lt){k[j]=null;let Z=null;const Pe=lt[j];Object.defineProperty(k,j,{get(){return Z},set(We){Z=We,P.isConnected?P.setAttribute(Pe,We):Ke.set(P,k)}})}};function Yt(P){const k=L.get(P),{form:j}=k;fe(P,j,k),vt(P,k.labels)}const Xe=(P,k=!1)=>{const j=document.createTreeWalker(P,NodeFilter.SHOW_ELEMENT,{acceptNode(We){return L.has(We)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});let Z=j.nextNode();const Pe=!k||P.disabled;for(;Z;)Z.formDisabledCallback&&Pe&&Nt(Z,P.disabled),Z=j.nextNode()},pt={attributes:!0,attributeFilter:["disabled","name"]},ke=tt()?new MutationObserver(P=>{for(const k of P){const j=k.target;if(k.attributeName==="disabled"&&(j.constructor.formAssociated?Nt(j,j.hasAttribute("disabled")):j.localName==="fieldset"&&Xe(j)),k.attributeName==="name"&&j.constructor.formAssociated){const Z=L.get(j),Pe=oe.get(j);Z.setFormValue(Pe)}}}):{};function it(P){P.forEach(k=>{const{addedNodes:j,removedNodes:Z}=k,Pe=Array.from(j),We=Array.from(Z);Pe.forEach(G=>{var he;if(L.has(G)&&G.constructor.formAssociated&&Yt(G),Ke.has(G)){const De=Ke.get(G);Object.keys(lt).filter(st=>De[st]!==null).forEach(st=>{G.setAttribute(lt[st],De[st])}),Ke.delete(G)}if(mt.has(G)){const De=mt.get(G);G.setAttribute("internals-valid",De.validity.valid.toString()),G.setAttribute("internals-invalid",(!De.validity.valid).toString()),G.setAttribute("aria-invalid",(!De.validity.valid).toString()),mt.delete(G)}if(G.localName==="form"){const De=ee.get(G),ut=document.createTreeWalker(G,NodeFilter.SHOW_ELEMENT,{acceptNode(un){return L.has(un)&&un.constructor.formAssociated&&!(De&&De.has(un))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});let st=ut.nextNode();for(;st;)Yt(st),st=ut.nextNode()}G.localName==="fieldset"&&((he=ke.observe)===null||he===void 0||he.call(ke,G,pt),Xe(G,!0))}),We.forEach(G=>{const he=L.get(G);he&&O.get(he)&&xt(he),He.has(G)&&He.get(G).disconnect()})})}function Ye(P){P.forEach(k=>{const{removedNodes:j}=k;j.forEach(Z=>{const Pe=ue.get(k.target);L.has(Z)&&Ie(Z),Pe.disconnect()})})}const qt=P=>{var k,j;const Z=new MutationObserver(Ye);!((k=window==null?void 0:window.ShadyDOM)===null||k===void 0)&&k.inUse&&P.mode&&P.host&&(P=P.host),(j=Z.observe)===null||j===void 0||j.call(Z,P,{childList:!0}),ue.set(P,Z)};tt()&&new MutationObserver(it);const vn={childList:!0,subtree:!0},Nt=(P,k)=>{P.toggleAttribute("internals-disabled",k),k?P.setAttribute("aria-disabled","true"):P.removeAttribute("aria-disabled"),P.formDisabledCallback&&P.formDisabledCallback.apply(P,[k])},xt=P=>{O.get(P).forEach(j=>{j.remove()}),O.set(P,[])},hn=(P,k)=>{const j=document.createElement("input");return j.type="hidden",j.name=P.getAttribute("name"),P.after(j),O.get(k).push(j),j},rt=(P,k)=>{var j;O.set(k,[]),(j=ke.observe)===null||j===void 0||j.call(ke,P,pt)},vt=(P,k)=>{if(k.length){Array.from(k).forEach(Z=>Z.addEventListener("click",P.click.bind(P)));let j=k[0].id;k[0].id||(j=`${k[0].htmlFor}_Label`,k[0].id=j),P.setAttribute("aria-labelledby",j)}},Ht=P=>{const k=Array.from(P.elements).filter(We=>!We.tagName.includes("-")&&We.validity).map(We=>We.validity.valid),j=ee.get(P)||[],Z=Array.from(j).filter(We=>We.isConnected).map(We=>L.get(We).validity.valid),Pe=[...k,...Z].includes(!1);P.toggleAttribute("internals-invalid",Pe),P.toggleAttribute("internals-valid",!Pe)},kt=P=>{Ht(D(P.target))},we=P=>{Ht(D(P.target))},le=P=>{const k=["button[type=submit]","input[type=submit]","button:not([type])"].map(j=>`${j}:not([disabled])`).map(j=>`${j}:not([form])${P.id?`,${j}[form='${P.id}']`:""}`).join(",");P.addEventListener("click",j=>{if(j.target.closest(k)){const Pe=ee.get(P);if(P.noValidate)return;Pe.size&&Array.from(Pe).reverse().map(he=>L.get(he).reportValidity()).includes(!1)&&j.preventDefault()}})},Le=P=>{const k=ee.get(P.target);k&&k.size&&k.forEach(j=>{j.constructor.formAssociated&&j.formResetCallback&&j.formResetCallback.apply(j)})},fe=(P,k,j)=>{if(k){const Z=ee.get(k);if(Z)Z.add(P);else{const Pe=new Set;Pe.add(P),ee.set(k,Pe),le(k),k.addEventListener("reset",Le),k.addEventListener("input",kt),k.addEventListener("change",we)}S.set(k,{ref:P,internals:j}),P.constructor.formAssociated&&P.formAssociatedCallback&&setTimeout(()=>{P.formAssociatedCallback.apply(P,[k])},0),Ht(k)}},D=P=>{let k=P.parentNode;return k&&k.tagName!=="FORM"&&(k=D(k)),k},Q=(P,k,j=DOMException)=>{if(!P.constructor.formAssociated)throw new j(k)},$e=(P,k,j)=>{const Z=ee.get(P);return Z&&Z.size&&Z.forEach(Pe=>{L.get(Pe)[j]()||(k=!1)}),k},Ie=P=>{if(P.constructor.formAssociated){const k=L.get(P),{labels:j,form:Z}=k;vt(P,j),fe(P,Z,k)}};function tt(){return typeof MutationObserver<"u"}class ot{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)}}const bt=P=>(P.badInput=!1,P.customError=!1,P.patternMismatch=!1,P.rangeOverflow=!1,P.rangeUnderflow=!1,P.stepMismatch=!1,P.tooLong=!1,P.tooShort=!1,P.typeMismatch=!1,P.valid=!0,P.valueMissing=!1,P),yt=(P,k,j)=>(P.valid=ht(k),Object.keys(k).forEach(Z=>P[Z]=k[Z]),j&&Ht(j),P),ht=P=>{let k=!0;for(let j in P)j!=="valid"&&P[j]!==!1&&(k=!1);return k},Kt=new WeakMap;function qn(P,k){P.toggleAttribute(k,!0),P.part&&P.part.add(k)}class yr extends Set{static get isPolyfilled(){return!0}constructor(k){if(super(),!k||!k.tagName||k.tagName.indexOf("-")===-1)throw new TypeError("Illegal constructor");Kt.set(this,k)}add(k){if(!/^--/.test(k)||typeof k!="string")throw new DOMException(`Failed to execute 'add' on 'CustomStateSet': The specified value ${k} must start with '--'.`);const j=super.add(k),Z=Kt.get(this),Pe=`state${k}`;return Z.isConnected?qn(Z,Pe):setTimeout(()=>{qn(Z,Pe)}),j}clear(){for(let[k]of this.entries())this.delete(k);super.clear()}delete(k){const j=super.delete(k),Z=Kt.get(this);return Z.isConnected?(Z.toggleAttribute(`state${k}`,!1),Z.part&&Z.part.remove(`state${k}`)):setTimeout(()=>{Z.toggleAttribute(`state${k}`,!1),Z.part&&Z.part.remove(`state${k}`)}),j}}function nn(P,k,j,Z){if(j==="a"&&!Z)throw new TypeError("Private accessor was defined without a getter");if(typeof k=="function"?P!==k||!Z:!k.has(P))throw new TypeError("Cannot read private member from an object whose class did not declare it");return j==="m"?Z:j==="a"?Z.call(P):Z?Z.value:k.get(P)}function jn(P,k,j,Z,Pe){if(typeof k=="function"?P!==k||!Pe:!k.has(P))throw new TypeError("Cannot write private member to an object whose class did not declare it");return k.set(P,j),j}var xn;class fr{constructor(k){xn.set(this,void 0),jn(this,xn,k);for(let j=0;j<k.length;j++){let Z=k[j];this[j]=Z,Z.hasAttribute("name")&&(this[Z.getAttribute("name")]=Z)}Object.freeze(this)}get length(){return nn(this,xn,"f").length}[(xn=new WeakMap,Symbol.iterator)](){return nn(this,xn,"f")[Symbol.iterator]()}item(k){return this[k]==null?null:this[k]}namedItem(k){return this[k]==null?null:this[k]}}function kn(){const P=HTMLFormElement.prototype.checkValidity;HTMLFormElement.prototype.checkValidity=j;const k=HTMLFormElement.prototype.reportValidity;HTMLFormElement.prototype.reportValidity=Z;function j(...We){let G=P.apply(this,We);return $e(this,G,"checkValidity")}function Z(...We){let G=k.apply(this,We);return $e(this,G,"reportValidity")}const{get:Pe}=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get(...We){const G=Pe.call(this,...We),he=Array.from(ee.get(this)||[]);if(he.length===0)return G;const De=Array.from(G).concat(he).sort((ut,st)=>ut.compareDocumentPosition?ut.compareDocumentPosition(st)&2?1:-1:0);return new fr(De)}})}class Mr{static get isPolyfilled(){return!0}constructor(k){if(!k||!k.tagName||k.tagName.indexOf("-")===-1)throw new TypeError("Illegal constructor");const j=k.getRootNode(),Z=new ot;this.states=new yr(k),y.set(this,k),E.set(this,Z),L.set(k,this),Vn(k,this),rt(k,this),Object.seal(this),j instanceof DocumentFragment&&qt(j)}checkValidity(){const k=y.get(this);if(Q(k,"Failed to execute 'checkValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const j=E.get(this);if(!j.valid){const Z=new Event("invalid",{bubbles:!1,cancelable:!0,composed:!1});k.dispatchEvent(Z)}return j.valid}get form(){const k=y.get(this);Q(k,"Failed to read the 'form' property from 'ElementInternals': The target element is not a form-associated custom element.");let j;return k.constructor.formAssociated===!0&&(j=D(k)),j}get labels(){const k=y.get(this);Q(k,"Failed to read the 'labels' property from 'ElementInternals': The target element is not a form-associated custom element.");const j=k.getAttribute("id"),Z=k.getRootNode();return Z&&j?Z.querySelectorAll(`[for="${j}"]`):[]}reportValidity(){const k=y.get(this);if(Q(k,"Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const j=this.checkValidity(),Z=ge.get(this);if(Z&&!k.constructor.formAssociated)throw new DOMException("Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.");return!j&&Z&&(k.focus(),Z.focus()),j}setFormValue(k){const j=y.get(this);if(Q(j,"Failed to execute 'setFormValue' on 'ElementInternals': The target element is not a form-associated custom element."),xt(this),k!=null&&!(k instanceof FormData)){if(j.getAttribute("name")){const Z=hn(j,this);Z.value=k}}else k!=null&&k instanceof FormData&&Array.from(k).reverse().forEach(([Z,Pe])=>{if(typeof Pe=="string"){const We=hn(j,this);We.name=Z,We.value=Pe}});oe.set(j,k)}setValidity(k,j,Z){const Pe=y.get(this);if(Q(Pe,"Failed to execute 'setValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!k)throw new TypeError("Failed to execute 'setValidity' on 'ElementInternals': 1 argument required, but only 0 present.");ge.set(this,Z);const We=E.get(this),G={};for(const ut in k)G[ut]=k[ut];Object.keys(G).length===0&&bt(We);const he=Object.assign(Object.assign({},We),G);delete he.valid;const{valid:De}=yt(We,he,this.form);if(!De&&!j)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.");q.set(this,De?"":j),Pe.isConnected?(Pe.toggleAttribute("internals-invalid",!De),Pe.toggleAttribute("internals-valid",De),Pe.setAttribute("aria-invalid",`${!De}`)):mt.set(Pe,this)}get shadowRoot(){const k=y.get(this),j=re.get(k);return j||null}get validationMessage(){const k=y.get(this);return Q(k,"Failed to read the 'validationMessage' property from 'ElementInternals': The target element is not a form-associated custom element."),q.get(this)}get validity(){const k=y.get(this);return Q(k,"Failed to read the 'validity' property from 'ElementInternals': The target element is not a form-associated custom element."),E.get(this)}get willValidate(){const k=y.get(this);return Q(k,"Failed to read the 'willValidate' property from 'ElementInternals': The target element is not a form-associated custom element."),!(k.disabled||k.hasAttribute("disabled")||k.hasAttribute("readonly"))}}function Fa(){if(typeof window>"u"||!window.ElementInternals||!HTMLElement.prototype.attachInternals)return!1;class P extends HTMLElement{constructor(){super(),this.internals=this.attachInternals()}}const k=`element-internals-feature-detection-${Math.random().toString(36).replace(/[^a-z]+/g,"")}`;customElements.define(k,P);const j=new P;return["shadowRoot","form","willValidate","validity","validationMessage","labels","setFormValue","setValidity","checkValidity","reportValidity"].every(Z=>Z in j.internals)}let An=!1,Kn=!1;function Lr(P){Kn||(Kn=!0,window.CustomStateSet=yr,P&&(HTMLElement.prototype.attachInternals=function(...k){const j=P.call(this,k);return j.states=new yr(this),j}))}function Xn(P=!0){if(!An){if(An=!0,typeof window<"u"&&(window.ElementInternals=Mr),typeof CustomElementRegistry<"u"){const k=CustomElementRegistry.prototype.define;CustomElementRegistry.prototype.define=function(j,Z,Pe){if(Z.formAssociated){const We=Z.prototype.connectedCallback;Z.prototype.connectedCallback=function(){ze.has(this)||(ze.set(this,!0),this.hasAttribute("disabled")&&Nt(this,!0)),We!=null&&We.apply(this),Ie(this)}}k.call(this,j,Z,Pe)}}if(typeof HTMLElement<"u"&&(HTMLElement.prototype.attachInternals=function(){if(this.tagName){if(this.tagName.indexOf("-")===-1)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': Unable to attach ElementInternals to non-custom elements.")}else return{};if(L.has(this))throw new DOMException("DOMException: Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");return new Mr(this)}),typeof Element<"u"){let k=function(...Z){const Pe=j.apply(this,Z);if(re.set(this,Pe),tt()){const We=new MutationObserver(it);window.ShadyDOM?We.observe(this,vn):We.observe(Pe,vn),He.set(this,We)}return Pe};const j=Element.prototype.attachShadow;Element.prototype.attachShadow=k}tt()&&typeof document<"u"&&new MutationObserver(it).observe(document.documentElement,vn),typeof HTMLFormElement<"u"&&kn(),(P||typeof window<"u"&&!window.CustomStateSet)&&Lr()}}return!!customElements.polyfillWrapFlushCallback||(Fa()?typeof window<"u"&&!window.CustomStateSet&&Lr(HTMLElement.prototype.attachInternals):Xn(!1)),U.forceCustomStateSetPolyfill=Lr,U.forceElementInternalsPolyfill=Xn,Object.defineProperty(U,"__esModule",{value:!0}),U})({})})();var RD=Object.defineProperty,aR=(U,y,E,O)=>{for(var L=void 0,q=U.length-1,S;q>=0;q--)(S=U[q])&&(L=S(y,E,L)||L);return L&&RD(y,E,L),L};class j0 extends av{constructor(){super(),this.strings=rR,this.role=null}connectedCallback(){super.connectedCallback()}createRenderRoot(){return this}hotReplacedCallback(){this.requestUpdate()}update(y){y.forEach((E,O)=>{typeof O=="string"&&this[O]&&typeof this[O]=="object"&&this[O].$$typeof&&(this[O]=yD(this[O]))}),super.update(y)}}aR([V0({type:Object})],j0.prototype,"strings");aR([V0({type:String})],j0.prototype,"role");exports.E=cr;exports.PktElement=j0;exports.T=Gs;exports.Z=Kk;exports.n=V0;exports.t=Zk;exports.translations=rR;exports.x=qk;
|
|
@@ -21200,6 +21200,9 @@ const pD = (U) => {
|
|
|
21200
21200
|
prevMonth: "Forrige måned",
|
|
21201
21201
|
nextMonth: "Neste måned"
|
|
21202
21202
|
}, gD = {
|
|
21203
|
+
search: {
|
|
21204
|
+
placeholder: "Søk…"
|
|
21205
|
+
},
|
|
21203
21206
|
labels: {
|
|
21204
21207
|
optional: "Valgfritt",
|
|
21205
21208
|
required: "Må fylles ut"
|
|
@@ -21215,6 +21218,9 @@ const pD = (U) => {
|
|
|
21215
21218
|
dateUnderflow: "For tidlig dato",
|
|
21216
21219
|
dateOverflow: "For sen dato"
|
|
21217
21220
|
},
|
|
21221
|
+
helptext: {
|
|
21222
|
+
helptextDropdownButton: "Les mer"
|
|
21223
|
+
},
|
|
21218
21224
|
date: {
|
|
21219
21225
|
multiple: "Her kan du velge flere datoer. Trykk komma eller enter når du har skrevet inn en dato."
|
|
21220
21226
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("./element-
|
|
1
|
+
"use strict";const e=require("./element-BBo3JZk5.cjs"),x=require("./ref-DsoUUoPU.cjs"),h=require("./icon-BTUCDPN5.cjs"),u=require("./class-map-D4rXyUxT.cjs"),c=require("./state-BILlRnrD.cjs"),a=require("./stringutils-CkVRq4jP.cjs"),d=require("./input-wrapper-jPnKsfEC.cjs"),k=require("./pkt-slot-controller-CqNvEpFd.cjs");var _=Object.defineProperty,w=Object.getOwnPropertyDescriptor,r=(s,p,l,n)=>{for(var t=n>1?void 0:n?w(p,l):p,o=s.length-1,i;o>=0;o--)(i=s[o])&&(t=(n?i(p,l,t):i(t))||t);return n&&t&&_(p,l,t),t};exports.PktHelptext=class extends e.PktElement{constructor(){super(),this.defaultSlot=x.e(),this.forId=a.uuidish(),this.helptext="",this.helptextDropdown="",this.helptextDropdownButton=d.specs.props.helptextDropdownButton.default,this.isHelpTextOpen=!1,this.slotController=new k.PktSlotController(this,this.defaultSlot)}render(){const p=()=>{const t=!this.isHelpTextOpen;this.isHelpTextOpen=t,this.dispatchEvent(new CustomEvent("toggleHelpText",{bubbles:!0,detail:{isOpen:t}}))},l=()=>this.helptextDropdown?e.x`<div class="pkt-inputwrapper__helptext-expandable">
|
|
2
2
|
<button
|
|
3
3
|
class="pkt-link pkt-link--icon-right pkt-btn pkt-btn--small pkt-btn--tertiary pkt-btn--icon-right"
|
|
4
4
|
type="button"
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
>
|
|
16
16
|
${h.o(this.helptextDropdown)}
|
|
17
17
|
</div>
|
|
18
|
-
</div>`:e.E,n=()=>e.x`<div>
|
|
18
|
+
</div>`:e.E,n=()=>e.x`<div class="pkt-inputwrapper__helptext-container">
|
|
19
19
|
<div class="pkt-inputwrapper__helptext" id="${this.forId}-helptext">
|
|
20
20
|
<div class="pkt-contents" ${x.n(this.defaultSlot)} name="helptext"></div>
|
|
21
21
|
${this.helptext&&h.o(this.helptext)}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { P as d, x as a, n as i, a as u, E as c } from "./element-
|
|
2
|
-
import { e as f, n as m } from "./ref-
|
|
3
|
-
import { o as x } from "./icon-
|
|
4
|
-
import { e as
|
|
5
|
-
import { r as w } from "./state-
|
|
6
|
-
import { u as
|
|
1
|
+
import { P as d, x as a, n as i, a as u, E as c } from "./element-G8JoS0Lj.js";
|
|
2
|
+
import { e as f, n as m } from "./ref-cRTOoM4R.js";
|
|
3
|
+
import { o as x } from "./icon-BJnwW0eh.js";
|
|
4
|
+
import { e as _ } from "./class-map-ChuDQU5C.js";
|
|
5
|
+
import { r as w } from "./state-gfUuUqVg.js";
|
|
6
|
+
import { u as v } from "./stringutils-DJjRa8dG.js";
|
|
7
7
|
import { s as k } from "./input-wrapper-Bw9tARAD.js";
|
|
8
|
-
import { P as b } from "./pkt-slot-controller-
|
|
8
|
+
import { P as b } from "./pkt-slot-controller-D1DakVrU.js";
|
|
9
9
|
var D = Object.defineProperty, O = Object.getOwnPropertyDescriptor, n = (r, o, s, t) => {
|
|
10
10
|
for (var e = t > 1 ? void 0 : t ? O(o, s) : o, l = r.length - 1, h; l >= 0; l--)
|
|
11
11
|
(h = r[l]) && (e = (t ? h(o, s, e) : h(e)) || e);
|
|
@@ -13,7 +13,7 @@ var D = Object.defineProperty, O = Object.getOwnPropertyDescriptor, n = (r, o, s
|
|
|
13
13
|
};
|
|
14
14
|
let p = class extends d {
|
|
15
15
|
constructor() {
|
|
16
|
-
super(), this.defaultSlot = f(), this.forId =
|
|
16
|
+
super(), this.defaultSlot = f(), this.forId = v(), this.helptext = "", this.helptextDropdown = "", this.helptextDropdownButton = k.props.helptextDropdownButton.default, this.isHelpTextOpen = !1, this.slotController = new b(this, this.defaultSlot);
|
|
17
17
|
}
|
|
18
18
|
render() {
|
|
19
19
|
const r = () => {
|
|
@@ -37,7 +37,7 @@ let p = class extends d {
|
|
|
37
37
|
<span class="pkt-btn__text">${x(this.helptextDropdownButton)}</span>
|
|
38
38
|
</button>
|
|
39
39
|
<div
|
|
40
|
-
class="${
|
|
40
|
+
class="${_({
|
|
41
41
|
"pkt-inputwrapper__helptext": !0,
|
|
42
42
|
"pkt-inputwrapper__helptext-expandable-open": this.isHelpTextOpen,
|
|
43
43
|
"pkt-inputwrapper__helptext-expandable-closed": !this.isHelpTextOpen
|
|
@@ -46,7 +46,7 @@ let p = class extends d {
|
|
|
46
46
|
${x(this.helptextDropdown)}
|
|
47
47
|
</div>
|
|
48
48
|
</div>` : c;
|
|
49
|
-
return a`${a`<div>
|
|
49
|
+
return a`${a`<div class="pkt-inputwrapper__helptext-container">
|
|
50
50
|
<div class="pkt-inputwrapper__helptext" id="${this.forId}-helptext">
|
|
51
51
|
<div class="pkt-contents" ${m(this.defaultSlot)} name="helptext"></div>
|
|
52
52
|
${this.helptext && x(this.helptext)}
|
package/dist/helptext.d.ts
CHANGED
|
@@ -1,6 +1,31 @@
|
|
|
1
1
|
export { }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Pkt Select is a wrapper for the native select element using the pkt-input-wrapper component.
|
|
6
|
+
*
|
|
7
|
+
* The component will prioritize options passed as a prop over options passed as children if both are provided.
|
|
8
|
+
* This is to allow for dynamic options that might change in the case of both children/slot and props are provided.
|
|
9
|
+
*
|
|
10
|
+
* @slot (default) - Options to be rendered as children
|
|
11
|
+
* @prop {TSelectOption[]} options - Options to be rendered as children
|
|
12
|
+
*
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
declare global {
|
|
16
|
+
interface HTMLElementTagNameMap {
|
|
17
|
+
'pkt-select': PktSelect & HTMLSelectElement;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
declare global {
|
|
23
|
+
interface HTMLElementTagNameMap {
|
|
24
|
+
'pkt-combobox': PktCombobox & HTMLSelectElement;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
4
29
|
declare global {
|
|
5
30
|
interface HTMLElementTagNameMap {
|
|
6
31
|
'pkt-icon': PktIcon;
|
|
@@ -8,6 +33,13 @@ declare global {
|
|
|
8
33
|
}
|
|
9
34
|
|
|
10
35
|
|
|
36
|
+
declare global {
|
|
37
|
+
interface HTMLElementTagNameMap {
|
|
38
|
+
'pkt-listbox': PktListbox;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
11
43
|
declare global {
|
|
12
44
|
interface Window {
|
|
13
45
|
pktTz: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const o=require("./element-
|
|
1
|
+
"use strict";const o=require("./element-BBo3JZk5.cjs"),a=require("./directive-C_VV3qwo.cjs");/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
package/dist/icon.d.ts
CHANGED
|
@@ -1,6 +1,31 @@
|
|
|
1
1
|
export { }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Pkt Select is a wrapper for the native select element using the pkt-input-wrapper component.
|
|
6
|
+
*
|
|
7
|
+
* The component will prioritize options passed as a prop over options passed as children if both are provided.
|
|
8
|
+
* This is to allow for dynamic options that might change in the case of both children/slot and props are provided.
|
|
9
|
+
*
|
|
10
|
+
* @slot (default) - Options to be rendered as children
|
|
11
|
+
* @prop {TSelectOption[]} options - Options to be rendered as children
|
|
12
|
+
*
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
declare global {
|
|
16
|
+
interface HTMLElementTagNameMap {
|
|
17
|
+
'pkt-select': PktSelect & HTMLSelectElement;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
declare global {
|
|
23
|
+
interface HTMLElementTagNameMap {
|
|
24
|
+
'pkt-combobox': PktCombobox & HTMLSelectElement;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
4
29
|
declare global {
|
|
5
30
|
interface HTMLElementTagNameMap {
|
|
6
31
|
'pkt-icon': PktIcon;
|
|
@@ -8,6 +33,13 @@ declare global {
|
|
|
8
33
|
}
|
|
9
34
|
|
|
10
35
|
|
|
36
|
+
declare global {
|
|
37
|
+
interface HTMLElementTagNameMap {
|
|
38
|
+
'pkt-listbox': PktListbox;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
11
43
|
declare global {
|
|
12
44
|
interface Window {
|
|
13
45
|
pktTz: string;
|