@oslokommune/punkt-elements 20.0.0 → 20.0.5
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 +17 -0
- package/dist/{accordion-5N_ptxrN.cjs → accordion-CSSp30G1.cjs} +1 -1
- package/dist/{accordion-C5cu1xXT.js → accordion-DIjltHSH.js} +11 -14
- package/dist/{alert-CA1fDbyc.js → alert-B00bIA5q.js} +36 -38
- package/dist/{alert-DkyTTo7S.cjs → alert-DPtmkrJq.cjs} +12 -12
- package/dist/{async-directive-DCLIOGR8.cjs → async-directive-Bn7zgxUy.cjs} +1 -1
- package/dist/{async-directive-BcS8rfeC.js → async-directive-Ct3Mrb1M.js} +10 -11
- package/dist/{backlink-CXOxMeyt.cjs → backlink-BAvqdPlG.cjs} +1 -1
- package/dist/{backlink-CDBRcaAu.js → backlink-MBTAhQuD.js} +5 -7
- package/dist/{booleanish-OQJTYSrw.js → booleanish-CBa3Cr2h.js} +1 -2
- package/dist/{breadcrumbs-5oUaCef3.js → breadcrumbs-DtEt1-wn.js} +3 -4
- package/dist/button-BI1PsdE1.cjs +32 -0
- package/dist/{button-Bswo1C0M.js → button-Bd-0TYe7.js} +29 -31
- package/dist/{calendar-BOd-9PDd.js → calendar-CkAAgviq.js} +66 -76
- package/dist/calendar-xYEsKilS.cjs +85 -0
- package/dist/{card-DH1kPnyi.js → card-CsEfBJcP.js} +10 -12
- package/dist/{card-njWrvrHm.cjs → card-XznwedEG.cjs} +1 -1
- package/dist/{checkbox-iMOdzpJ_.cjs → checkbox-Cg7wnn8U.cjs} +1 -1
- package/dist/{checkbox-DIJbuqWm.js → checkbox-XvlUQmg5.js} +8 -10
- package/dist/{checkbox-group-DLLbWgQb.js → checkbox-group-D038oaif.js} +8 -10
- package/dist/{checkbox-group-Kua6HuRE.cjs → checkbox-group-DHi7HgkS.cjs} +1 -1
- package/dist/{class-map-BDwVSgLb.js → class-map-C9n5CNC8.js} +2 -3
- package/dist/{classutils-DcYnSgfc.js → classutils-C4jETHHk.js} +1 -2
- package/dist/{combobox-H5FLG8BV.js → combobox-BR2qOS5z.js} +63 -66
- package/dist/combobox-Bn51heWm.cjs +139 -0
- package/dist/components/tag/tag.d.ts +3 -11
- package/dist/{consent-p-0n2b9x.js → consent-KrraWq7K.js} +5 -7
- package/dist/{consent-UkinU27V.cjs → consent-ifEcAAhG.cjs} +1 -1
- package/dist/{consume-Bp12si68.js → consume-C6aWEFx-.js} +4 -8
- package/dist/{converters-CW6SN0TT.cjs → converters-Dp64-kF1.cjs} +1 -1
- package/dist/{converters-CYgQrWVm.js → converters-v_GK06o3.js} +36 -72
- package/dist/{datepicker-ZSwWg8xW.js → datepicker-BZpiJeLW.js} +86 -90
- package/dist/{datepicker-COar3rRT.cjs → datepicker-Bt8zKLPK.cjs} +53 -53
- package/dist/define-component-spec-wHP10r2x.js +5 -0
- package/dist/{dialog-polyfill.esm-D39dWbRt.js → dialog-polyfill.esm-BGBREnq_.js} +2 -3
- package/dist/dialog-polyfill.esm-BPk0-8XP.cjs +1 -0
- package/dist/{directive-helpers-BoDzpPID.js → directive-helpers-KMRvtO9j.js} +2 -3
- package/dist/{element-DLgZkx5L.js → element-Bwc-likm.js} +9 -18
- package/dist/{element-with-slot-mG-h7Sjw.js → element-with-slot-47quDZRt.js} +4 -6
- package/dist/{element-with-slot-CeKuRE3_.cjs → element-with-slot-D_8fAzCW.cjs} +1 -1
- package/dist/{fetch-header-footer-data-Pc32etrk.js → fetch-header-footer-data-CPVt_P8s.js} +3 -6
- package/dist/{fileupload-vPDmtXiM.js → fileupload-A7RNV7ic.js} +25 -36
- package/dist/{fileupload-DXJtAagE.cjs → fileupload-Cw4xeUZn.cjs} +1 -1
- package/dist/{focus-modality-controller-Dc2S-KqR.js → focus-modality-controller-DVsT6GeR.js} +1 -2
- package/dist/focus-trap-C-PcFOw6.js +42 -0
- package/dist/focus-trap-C9tsr-xL.cjs +1 -0
- package/dist/{footer-D8t0PCPC.js → footer-HqNhiUa1.js} +20 -24
- package/dist/{footer-CpE05IW2.cjs → footer-dnW2aMEr.cjs} +9 -9
- package/dist/{format-BTeSVkED.js → format-DwjTfa9h.js} +1 -2
- package/dist/{header-DzYKgl-k.cjs → header-CKGwNWBI.cjs} +2 -2
- package/dist/{header-Bo8uvddg.js → header-VOj1cfsA.js} +22 -26
- package/dist/{header-menu-Dq9lwNr1.cjs → header-menu-BJMMwrCR.cjs} +1 -1
- package/dist/{header-menu-BrjsNjBH.js → header-menu-k2ACrfOv.js} +9 -11
- package/dist/{heading-DAkjw2Am.cjs → heading-BNlor2MU.cjs} +1 -1
- package/dist/{heading-CMZmPEL9.js → heading-SYKHysr8.js} +19 -21
- package/dist/{helptext-Bse1LpRd.cjs → helptext-CQaNvbiv.cjs} +9 -9
- package/dist/{helptext-BFQzrOw4.js → helptext-kKmVQkwo.js} +20 -22
- package/dist/{icon-C1oCGwEe.js → icon-CZDw42U7.js} +5 -8
- package/dist/if-defined-B3pYog2C.js +4 -0
- package/dist/{input-element-2LHxo0em.cjs → input-element-CfZIyfon.cjs} +1 -1
- package/dist/{input-element-De40zUox.js → input-element-DE0FzjgP.js} +19 -25
- package/dist/{input-wrapper-DkpJS1hR.js → input-wrapper-C6BRd-cu.js} +13 -15
- package/dist/{input-wrapper-C_Rzwxx7.cjs → input-wrapper-CdH6RH0a.cjs} +1 -1
- package/dist/{link-DZgG_8Ni.js → link-Bc4zf-Dj.js} +20 -22
- package/dist/link-lPrxhYq0.cjs +7 -0
- package/dist/{linkcard-DIG6VYpl.cjs → linkcard-Bih7HS2t.cjs} +1 -1
- package/dist/{linkcard-Dr-r8jBO.js → linkcard-LCFAdVsG.js} +7 -9
- package/dist/{listbox-HrH4JonS.cjs → listbox-Du8llYth.cjs} +10 -10
- package/dist/{listbox-DAvIBH4P.js → listbox-df8gHweY.js} +17 -19
- package/dist/{loader-CFidlqSG.js → loader-C-2b3bGK.js} +9 -12
- package/dist/{loader-DTIrOtTo.cjs → loader-DiQSwWpb.cjs} +1 -1
- package/dist/{messagebox-BLYx3AL7.cjs → messagebox-BiG-fJX9.cjs} +1 -1
- package/dist/{messagebox-B_07P0QA.js → messagebox-CH3bKoJO.js} +9 -11
- package/dist/modal-B3rnE83a.cjs +37 -0
- package/dist/{modal-CA_M2Ix6.js → modal-SBJ8aGvM.js} +33 -35
- package/dist/{option-group-element-DzM8YznZ.js → option-group-element-C8oJxuQQ.js} +7 -8
- package/dist/{option-group-element-CVNaBIlP.cjs → option-group-element-_LrpXfK1.cjs} +1 -1
- package/dist/pkt-accordion.cjs +1 -1
- package/dist/pkt-accordion.js +1 -1
- 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-breadcrumbs.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-group.cjs +1 -1
- package/dist/pkt-checkbox-group.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-consent.cjs +1 -1
- package/dist/pkt-consent.js +1 -1
- package/dist/pkt-datepicker.cjs +1 -1
- package/dist/pkt-datepicker.js +2 -3
- package/dist/pkt-fileupload.cjs +1 -1
- package/dist/pkt-fileupload.js +1 -1
- package/dist/pkt-footer.cjs +1 -1
- package/dist/pkt-footer.js +1 -1
- package/dist/pkt-header-menu.cjs +1 -1
- package/dist/pkt-header-menu.js +1 -1
- package/dist/pkt-header.cjs +1 -1
- package/dist/pkt-header.js +1 -1
- package/dist/pkt-heading.cjs +1 -1
- package/dist/pkt-heading.js +1 -1
- package/dist/pkt-helptext.cjs +1 -1
- package/dist/pkt-helptext.js +1 -1
- package/dist/pkt-icon.js +1 -1
- package/dist/pkt-index.cjs +1 -1
- package/dist/pkt-index.js +37 -37
- 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 -1
- package/dist/pkt-listbox.js +1 -1
- 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-CzvBlEPD.js → pkt-options-controller-Dz7DP0wC.js} +2 -3
- package/dist/{pkt-options-controller-9zoH1OBW.cjs → pkt-options-controller-WsHVdPJA.cjs} +1 -1
- package/dist/pkt-progressbar.cjs +1 -1
- package/dist/pkt-progressbar.js +1 -1
- package/dist/pkt-radio-group.cjs +1 -1
- package/dist/pkt-radio-group.js +1 -1
- package/dist/pkt-radiobutton.cjs +1 -1
- package/dist/pkt-radiobutton.js +1 -1
- package/dist/pkt-searchinput.cjs +1 -1
- package/dist/pkt-searchinput.js +1 -1
- package/dist/pkt-select.cjs +1 -1
- package/dist/pkt-select.js +1 -1
- package/dist/pkt-tabs.cjs +1 -1
- package/dist/pkt-tabs.js +1 -1
- 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/pkt-timepicker.cjs +1 -1
- package/dist/pkt-timepicker.js +1 -1
- package/dist/{progressbar-CfCc2zhp.js → progressbar-DlbkKRgP.js} +9 -11
- package/dist/{progressbar-BdqIhC1Z.cjs → progressbar-Wyq_Q1Ur.cjs} +1 -1
- package/dist/{provide-_MnlMGnw.js → provide-DFu2tSv_.js} +3 -5
- package/dist/{radio-group-BRY_74od.js → radio-group-Kr2BCSvg.js} +8 -10
- package/dist/{radio-group-CsUgnEv0.cjs → radio-group-RWgTs_uV.cjs} +1 -1
- package/dist/{radiobutton-CQhuG2lj.cjs → radiobutton-86ZvvDmJ.cjs} +1 -1
- package/dist/{radiobutton-lHnq8wX_.js → radiobutton-Bf6aFfYt.js} +8 -10
- package/dist/{ref-B6p6mQkO.cjs → ref-C6VUWwmF.cjs} +1 -1
- package/dist/{ref-BAegS9BR.js → ref-qE1RBrI7.js} +3 -4
- package/dist/{repeat-Cy1M16Di.js → repeat-c2P6osbb.js} +3 -4
- package/dist/{scroll-lock-CR-g54ai.js → scroll-lock-C9jzbJ4E.js} +1 -2
- package/dist/{searchinput-TAqMUJ0B.cjs → searchinput-D5l64Mkb.cjs} +7 -7
- package/dist/{searchinput-BLGaXkP6.js → searchinput-DN8kDZQ1.js} +18 -20
- package/dist/{select-Dle67Uwv.cjs → select-CZ3L48N_.cjs} +15 -15
- package/dist/{select-BvtUxW0Q.js → select-Curv4lWO.js} +15 -18
- package/dist/shared-types/index.d.ts +3 -2
- package/dist/shared-types/skin.d.ts +1 -10
- package/dist/shared-types/tag.d.ts +46 -0
- package/dist/shared-types-BvRk9kiK.js +0 -0
- package/dist/{tabs-Bu_-WfCK.js → tabs-Cg16Sl3u.js} +57 -60
- package/dist/{tabs-Dwk5PKzP.cjs → tabs-n7hQWwyI.cjs} +22 -22
- package/dist/tag-BAikRN2Y.cjs +27 -0
- package/dist/{tag-CkZ2Mn4a.js → tag-HXcXopyA.js} +15 -106
- package/dist/{textarea-Djp5L2Zd.js → textarea-B1iUKCro.js} +12 -14
- package/dist/{textarea-DSX3jMlI.cjs → textarea-DbD7sOLV.cjs} +1 -1
- package/dist/{textinput-CBrOZcvL.js → textinput-CKbUvHNH.js} +11 -13
- package/dist/{textinput-CN2F3Q3H.cjs → textinput-C_5jzdg3.cjs} +1 -1
- package/dist/{timepicker-CkaJkIGn.cjs → timepicker-By-kvx3z.cjs} +20 -20
- package/dist/{timepicker-CT4wfrgQ.js → timepicker-DkXpFBpQ.js} +27 -28
- package/dist/{utils-BwF4QSrq.js → utils-Dn5ykFtS.js} +1 -2
- package/package.json +10 -10
- package/src/components/tag/tag.test.ts +6 -0
- package/src/components/tag/tag.ts +17 -23
- package/dist/button-bVWAX98x.cjs +0 -32
- package/dist/calendar-CDTCgTJn.cjs +0 -85
- package/dist/combobox-BwAxmoG9.cjs +0 -139
- package/dist/define-component-spec-BYOSeplU.js +0 -6
- package/dist/dialog-polyfill.esm-CW51hN2p.cjs +0 -1
- package/dist/focus-trap-DG3pEuyJ.js +0 -60
- package/dist/focus-trap-DSv4Ifqm.cjs +0 -1
- package/dist/if-defined-DiYi2v_Q.js +0 -5
- package/dist/link-B7t4iOKk.cjs +0 -7
- package/dist/modal-BvTfLfFq.cjs +0 -37
- package/dist/shared-types-A6iGIX-f.js +0 -1
- package/dist/tag-1SSexs0H.cjs +0 -27
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
const e=require("./element-CEarCnHH.cjs"),t=require("./
|
|
2
|
-
<div class=${
|
|
3
|
-
${Array.isArray(this.dates)&&this.dates[0]?
|
|
4
|
-
id=${this.idBase+
|
|
1
|
+
const e=require("./element-CEarCnHH.cjs"),t=require("./converters-Dp64-kF1.cjs"),n=require("./input-element-CfZIyfon.cjs"),r=require("./ref-C6VUWwmF.cjs");require("./calendar-xYEsKilS.cjs"),require("./icon-5A378_yh.cjs"),require("./input-wrapper-CdH6RH0a.cjs");const i=require("./class-map-C82GtM1w.cjs"),a=require("./repeat-CjvNrcUr.cjs");require("./tag-BAikRN2Y.cjs");const o=require("./utils-63cRpWut.cjs"),s=require("./if-defined-Ci4ZQsgL.cjs"),c=require("./element-with-slot-D_8fAzCW.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=o.n()}render(){return this.classes={"pkt-date-tags":!0,[this.className]:!0},e._`
|
|
2
|
+
<div class=${i.t(this.classes)} aria-live="polite">
|
|
3
|
+
${Array.isArray(this.dates)&&this.dates[0]?a.t(t.h((this.dates??[]).filter(Boolean)),e=>e,n=>e._` <pkt-tag
|
|
4
|
+
id=${this.idBase+n+`-tag`}
|
|
5
5
|
closeTag
|
|
6
|
-
@close=${()=>{this.dispatchEvent(new CustomEvent(`date-tag-removed`,{detail:
|
|
7
|
-
.ariaLabel=${`${this.pktStrings.get(`datepicker`).deleteDate} ${
|
|
6
|
+
@close=${()=>{this.dispatchEvent(new CustomEvent(`date-tag-removed`,{detail:n}))}}
|
|
7
|
+
.ariaLabel=${`${this.pktStrings.get(`datepicker`).deleteDate} ${t.c(n,this.dateformat)}`}
|
|
8
8
|
>
|
|
9
|
-
<time datetime=${
|
|
9
|
+
<time datetime=${n}>${t.c(n,this.dateformat)}</time>
|
|
10
10
|
</pkt-tag>`):e.h}
|
|
11
11
|
</div>
|
|
12
|
-
`}};e.n([e.u({type:Array})],l.prototype,`dates`,void 0),e.n([e.u({type:String})],l.prototype,`dateformat`,void 0),e.n([e.u({type:String,attribute:`class`})],l.prototype,`className`,void 0),e.n([e.u({type:String,attribute:`id-base`})],l.prototype,`idBase`,void 0);try{e.d(`pkt-date-tags`)(l)}catch{console.warn(`Forsøker å definere <pkt-date-tags>, men den er allerede definert`)}var u={name:`pkt-datepicker`,react:`PktDatepicker`,"css-class":`pkt-datepicker`,isElement:!0,isPureReact:!0,"dark-mode":!0,props:{name:{type:`string`,name:`Navn for innsending`,category:`tech`},form:{name:`Skjema`,description:`ID-en til skjemaet feltet hører til, når feltet ligger utenfor skjemaet`,type:`string`,required:!1,category:`tech`},label:{type:`string`,name:`Tekst/label`,category:`contents`},helptext:{type:`string`,name:`Hjelpetekst`,category:`contents`},helptextDropdown:{type:`string`,name:`Utvidet hjelpetekst`,description:`Hjelpetekst som vises i en lukket boks man kan åpne`,category:`contents`},helptextDropdownButton:{type:`string`,name:`Knappetekst for utvidet hjelpetekst`,default:`Les mer`,category:`contents`},dateformat:{name:`Datoformat for tags i flervalg`,type:`string`,default:`dd.MM.yyyy`,category:`tech`},currentmonth:{name:`Måned som vises i datovelgeren`,type:`ISOdatestring`,category:`tech`},value:{name:`Verdi (kommaseparert ved flervalg)`,type:`ISOdatestring`,variant:`multiple`,category:`tech`},excludeweekdays:{name:`Utelat ukedager`,type:`string`,description:`Kommaseparert liste over ukedager (1-7) som skal ekskluderes`,category:`functionality`},excludedates:{name:`Utelat datoer (Kommaseparerte ISO-datoer)`,type:`ISOdatestring`,variant:`multiple`,category:`functionality`},min:{name:`Tidligst tillatte dato`,type:`ISOdatestring`,default:null,category:`functionality`},max:{name:`Senest tillatte dato`,type:`ISOdatestring`,default:null,category:`functionality`},weeknumbers:{name:`Vis ukenummer`,type:`boolean`,reflect:!0,default:!1,category:`ui`},withcontrols:{name:`Med velgere for måned/år`,type:`boolean`,reflect:!0,default:!1,category:`ui`},multiple:{name:`Flervalg`,type:`boolean`,reflect:!0,default:!1,category:`functionality`},maxlength:{name:`Maks antall datoer i flervalg`,type:`number`,category:`functionality`,showIf:{multiple:!0}},range:{name:`Datotidsrom (fra og til)`,type:`boolean`,reflect:!0,default:!1,category:`functionality`},showRangeLabels:{attribute:`show-range-labels`,name:`Vis fra/til-etiketter`,type:`boolean`,default:!1,category:`ui`,showIf:{range:!0}},today:{name:`Dagens dato (overstyring)`,type:`ISOdatestring`,description:`ISO-datostreng som overstyrer dagens dato i kalenderen. Nyttig for snapshot-tester.`,category:`tech`},calendarOpen:{attribute:`calendar-open`,name:`Kalender åpen`,type:`boolean`,reflect:!0,default:!1,category:`ui`},hasError:{type:`boolean`,name:`Feil`,default:!1,category:`ui`},errorMessage:{type:`string`,name:`Feilmelding ved feil`,category:`contents`},disabled:{type:`boolean`,name:`Deaktivert`,default:!1,reflect:!0,category:`tech`},fullwidth:{type:`boolean`,name:`Full bredde`,default:!1,reflect:!0,category:`ui`},inputSize:{attribute:`input-size`,name:`Størrelse`,description:`Størrelsen på komponenten`,type:[`medium`,`small`,`xsmall`],default:`medium`,category:`ui`},required:{type:`boolean`,name:`Påkrevd`,default:!1,reflect:!0,category:`tech`},requiredTag:{type:`boolean`,name:`Vise påkrevd-merking`,default:!1,category:`ui`},requiredText:{type:`string`,name:`Påkrevd-tekst`,default:`Må fylles ut`,category:`contents`},optionalTag:{type:`boolean`,name:`Vise valgfritt-merking`,default:!1,category:`ui`},optionalText:{type:`string`,name:`Valgfritt-tekst`,default:`Valgfritt`,category:`contents`},tagText:{type:`string`,name:`Tag-tekst`,description:`Tekst som vises i en tag ved siden av label`,category:`ui`},useWrapper:{type:`boolean`,name:`Bruk wrapper`,description:`Indikerer at feltet skal ha synlig label og hjelpetekst`,displayAsFalse:!0,default:!0,category:`ui`},id:{type:`string`,name:`ID`,description:`Unik identifikasjon for datovelgeren`,category:`tech`},ariaDescribedby:{attribute:`aria-describedby`,name:`aria-describedby`,description:`Spesifiserer ID-en til elementet som beskriver feltet.`,type:`string`,category:`accessibility`},inline:{name:`Inline`,type:`boolean`,required:!1,default:!1,description:`Angir om feltet skal flyte med teksten`,category:`ui`},hasFieldset:{name:`Bruk fieldset`,type:`boolean`,required:!1,default:null,description:`Bruk fieldset og legend i stedet for label. Utledes automatisk når feltet består av flere kontroller.`,category:`ui`},counter:{name:`Teller`,type:`boolean`,required:!1,default:null,description:`Viser teller under feltet. Slås på av seg selv når det finnes en grense å telle mot; sett til false for å skru den av.`,category:`ui`}},events:{change:{type:`Event`,name:`change (Elements)`,description:`Returnerer valgt dato som streng i ISO-format. I range-modus utløses kun når begge datoer er valgt.`},"value-change":{type:`CustomEvent`,name:`value-change (Elements)`,description:`Returnerer en <code>array</code> med valgte datoer i ISO-format. I range-modus utløses kun når begge datoer er valgt.`},toggleHelpText:{type:`CustomEvent`,description:`Returnerer <code>event.detail { isOpen: true }</code> eller <code>event.detail { isOpen: false }</code> når hjelpeteksten åpnes eller lukkes`},onChange:{type:`Event`,name:`onChange (React)`,reactOnly:!0,description:`Utløses når en dato velges. <code>e.target.value</code> inneholder kommaseparerte ISO-datoer. I range-modus utløses kun når begge datoer er valgt.`},onValueChange:{type:`string[]`,name:`onValueChange (React)`,reactOnly:!0,description:`Returnerer en <code>string[]</code> med valgte datoer i ISO-format. I range-modus utløses kun når begge datoer er valgt.`}}},d=()=>{let e=navigator.userAgent;return!!(/iP(hone|od|ad)/.test(e)||/Macintosh/.test(e)&&`ontouchend`in document)},f=()=>d()?`text`:`date`,p=e=>!e||e.length!==2||a.u(e[0],e[1]),m=e=>a.h(e),h=(e,t,n,r,i)=>a.i(e,t,n,r,i),g=(e,t,n,r,i,a,o=`medium`)=>({"pkt-input":!0,"pkt-datepicker__input":!0,[`pkt-input--${o}`]:!0,"pkt-input--fullwidth":e,"pkt-datepicker--hasrangelabels":t,"pkt-datepicker--multiple":n,"pkt-datepicker--range":r,"ios-readonly-hack":i===!1&&a===`text`}),_=(e=`medium`)=>({"pkt-input-icon":!0,"pkt-btn":!0,"pkt-btn--icon-only":!0,"pkt-btn--tertiary":!0,[`pkt-btn--${e}`]:!0,"pkt-datepicker__calendar-button":!0}),v=e=>({"pkt-input-prefix":e,"pkt-hide":!e}),y=(e,t,n)=>!t&&!n?Array.isArray(e)?e[0]||``:e:Array.isArray(e)?e.join(`,`):e,b=(e,t,n=!1)=>{if(!e||!t)return;let r=t.parentElement?.getBoundingClientRect()||t.getBoundingClientRect(),i=n?r.height+30:r.height,a=e.getBoundingClientRect().height,o=n?`calc(100% - 30px)`:`100%`;r&&typeof window<`u`&&r.top+a>window.innerHeight&&r.top-a>0&&(o=`calc(100% - ${i}px - ${a}px)`),e.style.top=o},x=(e,t,n,r,i,a)=>{let{key:o}=e;o===`,`&&(e.preventDefault(),a?a(e):i&&i()),(o===`Space`||o===` `)&&(e.preventDefault(),t(e)),o===`Enter`&&(e.preventDefault(),n?n():r?r():i&&i())},S=(e,t)=>{let{key:n}=e;(n===`Enter`||n===` `||n===`Space`)&&(e.preventDefault(),t(e))},C={validateRangeOrder:p,sortDates:m,filterSelectableDates:h},w={getInputType:f},T={submitForm(e){let t=e.internals?.form;t&&t.requestSubmit()},submitFormOrFallback(e,t){let n=e?.form;n?n.requestSubmit():t()},validateDateInput(t,n,r,i,a){let o=t.value;if(!o)return;let s={...e.s.validation,...a};r&&r>o?n.setValidity({rangeUnderflow:!0},s.dateUnderflow,t):i&&i<o&&n.setValidity({rangeOverflow:!0},s.dateOverflow,t)}},E={addToSelected(e,t,n,r){let i=e.target;if(!i.value)return;let o=n?a.d(n):null,s=r?a.d(r):null,c=a.d(i.value.split(`,`)[0]);c&&!isNaN(c.getTime())&&(!o||c>=o)&&(!s||c<=s)&&t.value&&t.value.handleDateSelect(c),i.value=``},handleCalendarPosition(e,t,n=!1){b(e.value??null,t.value??null,n)}},D={getInputClasses:g,getButtonClasses:_,getRangeLabelClasses:v},O={processDateSelection:y,updateInputValues(e,t,n,r,i,a){e.value&&(r&&t?.value?(e.value.value=n[0]??``,t.value.value=n[1]??``,a(e.value),a(t.value)):i||(e.value.value=n.length?n[0]:``,a(e.value)))},processRangeBlur(e,t,n,r,i){let o=e.target;if(o.value){i(o);let e=a.s(o.value);e&&n?.value?.handleDateSelect(e)}else t[0]&&r()}},k={handleInputKeydown:x,handleButtonKeydown:S},A=class extends e.t{constructor(...e){super(...e),this.open=!1,this.multiple=!1,this.range=!1,this.weeknumbers=!1,this.withcontrols=!1,this.maxMultiple=null,this.selected=[],this.earliest=null,this.latest=null,this.excludedates=[],this.excludeweekdays=[],this.currentmonth=null,this.today=null,this._hasBeenOpened=!1,this.popupRef=i.t(),this.calendarRef=i.t(),this.handleDocumentClick=e=>{if(!this.open)return;let t=e.composedPath(),n=this.parentElement,r=this.popupRef.value;!t.includes(this)&&!t.includes(r)&&!(n&&t.includes(n))&&(this.hide(),this.dispatchEvent(new CustomEvent(`close`,{bubbles:!0,composed:!0})))},this.handleDocumentKeydown=e=>{this.open&&e.key===`Escape`&&(this.hide(),this.dispatchEvent(new CustomEvent(`close`,{bubbles:!0,composed:!0})))}}firstUpdated(){this.calRef=this.calendarRef}willUpdate(e){super.willUpdate(e),e.has(`open`)&&this.open&&(this._hasBeenOpened=!0)}updated(e){super.updated(e),e.has(`open`)&&(this.open?(document.addEventListener(`keydown`,this.handleDocumentKeydown),document.addEventListener(`click`,this.handleDocumentClick)):(document.removeEventListener(`click`,this.handleDocumentClick),document.removeEventListener(`keydown`,this.handleDocumentKeydown)))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(`click`,this.handleDocumentClick),document.removeEventListener(`keydown`,this.handleDocumentKeydown)}show(){this.open=!0,this.calendarRef.value?.focus()}hide(){this.open=!1}toggle(){this.open?this.hide():this.show()}contains(e){return!!e&&!!this.popupRef.value?.contains(e)}focusOnCurrentDate(){let e=this.calendarRef.value;e&&typeof e.focusOnCurrentDate==`function`&&e.focusOnCurrentDate()}addToSelected(e,t,n){if(this.calendarRef.value&&typeof E.addToSelected==`function`)return E.addToSelected(e,this.calendarRef,t,n);let r=e.target;if(!r.value)return;let i=t?a.d(t):null,o=n?a.d(n):null,s=a.d(r.value.split(`,`)[0]);s&&!isNaN(s.getTime())&&(!i||s>=i)&&(!o||s<=o)&&this.handleDateSelect(s),r.value=``}handleDateSelect(e){let t=this.calendarRef.value;if(t&&typeof t.handleDateSelect==`function`)return t.handleDateSelect(e);let n=a.a(e),r=this.selected.indexOf(n)>=0?this.selected.filter(e=>e!==n):[...this.selected,n];this.selected=r,this.dispatchEvent(new CustomEvent(`date-selected`,{detail:r,bubbles:!0,composed:!0}))}render(){let n={"pkt-calendar-popup":!0,show:this.open,hide:!this.open};return e._`
|
|
12
|
+
`}};e.n([e.u({type:Array})],l.prototype,`dates`,void 0),e.n([e.u({type:String})],l.prototype,`dateformat`,void 0),e.n([e.u({type:String,attribute:`class`})],l.prototype,`className`,void 0),e.n([e.u({type:String,attribute:`id-base`})],l.prototype,`idBase`,void 0);try{e.d(`pkt-date-tags`)(l)}catch{console.warn(`Forsøker å definere <pkt-date-tags>, men den er allerede definert`)}var u={name:`pkt-datepicker`,react:`PktDatepicker`,"css-class":`pkt-datepicker`,isElement:!0,isPureReact:!0,"dark-mode":!0,props:{name:{type:`string`,name:`Navn for innsending`,category:`tech`},form:{name:`Skjema`,description:`ID-en til skjemaet feltet hører til, når feltet ligger utenfor skjemaet`,type:`string`,required:!1,category:`tech`},label:{type:`string`,name:`Tekst/label`,category:`contents`},helptext:{type:`string`,name:`Hjelpetekst`,category:`contents`},helptextDropdown:{type:`string`,name:`Utvidet hjelpetekst`,description:`Hjelpetekst som vises i en lukket boks man kan åpne`,category:`contents`},helptextDropdownButton:{type:`string`,name:`Knappetekst for utvidet hjelpetekst`,default:`Les mer`,category:`contents`},dateformat:{name:`Datoformat for tags i flervalg`,type:`string`,default:`dd.MM.yyyy`,category:`tech`},currentmonth:{name:`Måned som vises i datovelgeren`,type:`ISOdatestring`,category:`tech`},value:{name:`Verdi (kommaseparert ved flervalg)`,type:`ISOdatestring`,variant:`multiple`,category:`tech`},excludeweekdays:{name:`Utelat ukedager`,type:`string`,description:`Kommaseparert liste over ukedager (1-7) som skal ekskluderes`,category:`functionality`},excludedates:{name:`Utelat datoer (Kommaseparerte ISO-datoer)`,type:`ISOdatestring`,variant:`multiple`,category:`functionality`},min:{name:`Tidligst tillatte dato`,type:`ISOdatestring`,default:null,category:`functionality`},max:{name:`Senest tillatte dato`,type:`ISOdatestring`,default:null,category:`functionality`},weeknumbers:{name:`Vis ukenummer`,type:`boolean`,reflect:!0,default:!1,category:`ui`},withcontrols:{name:`Med velgere for måned/år`,type:`boolean`,reflect:!0,default:!1,category:`ui`},multiple:{name:`Flervalg`,type:`boolean`,reflect:!0,default:!1,category:`functionality`,exclusiveGroup:`selectionMode`},maxlength:{name:`Maks antall datoer i flervalg`,type:`number`,category:`functionality`,showIf:{multiple:!0}},range:{name:`Datotidsrom (fra og til)`,type:`boolean`,reflect:!0,default:!1,category:`functionality`,exclusiveGroup:`selectionMode`},showRangeLabels:{attribute:`show-range-labels`,name:`Vis fra/til-etiketter`,type:`boolean`,default:!1,category:`ui`,showIf:{range:!0}},today:{name:`Dagens dato (overstyring)`,type:`ISOdatestring`,description:`ISO-datostreng som overstyrer dagens dato i kalenderen. Nyttig for snapshot-tester.`,category:`tech`},calendarOpen:{attribute:`calendar-open`,name:`Kalender åpen`,type:`boolean`,reflect:!0,default:!1,category:`ui`},hasError:{type:`boolean`,name:`Feil`,default:!1,category:`ui`},errorMessage:{type:`string`,name:`Feilmelding ved feil`,category:`contents`},disabled:{type:`boolean`,name:`Deaktivert`,default:!1,reflect:!0,category:`tech`},fullwidth:{type:`boolean`,name:`Full bredde`,default:!1,reflect:!0,category:`ui`},inputSize:{attribute:`input-size`,name:`Størrelse`,description:`Størrelsen på komponenten`,type:[`medium`,`small`,`xsmall`],default:`medium`,category:`ui`},required:{type:`boolean`,name:`Påkrevd`,default:!1,reflect:!0,category:`tech`},requiredTag:{type:`boolean`,name:`Vise påkrevd-merking`,default:!1,category:`ui`},requiredText:{type:`string`,name:`Påkrevd-tekst`,default:`Må fylles ut`,category:`contents`},optionalTag:{type:`boolean`,name:`Vise valgfritt-merking`,default:!1,category:`ui`},optionalText:{type:`string`,name:`Valgfritt-tekst`,default:`Valgfritt`,category:`contents`},tagText:{type:`string`,name:`Tag-tekst`,description:`Tekst som vises i en tag ved siden av label`,category:`ui`},useWrapper:{type:`boolean`,name:`Bruk wrapper`,description:`Indikerer at feltet skal ha synlig label og hjelpetekst`,displayAsFalse:!0,default:!0,category:`ui`},id:{type:`string`,name:`ID`,description:`Unik identifikasjon for datovelgeren`,category:`tech`},ariaDescribedby:{attribute:`aria-describedby`,name:`aria-describedby`,description:`Spesifiserer ID-en til elementet som beskriver feltet.`,type:`string`,category:`accessibility`},inline:{name:`Inline`,type:`boolean`,required:!1,default:!1,description:`Angir om feltet skal flyte med teksten`,category:`ui`},hasFieldset:{name:`Bruk fieldset`,type:`boolean`,required:!1,default:null,description:`Bruk fieldset og legend i stedet for label. Utledes automatisk når feltet består av flere kontroller.`,category:`ui`},counter:{name:`Teller`,type:`boolean`,required:!1,default:null,description:`Viser teller under feltet. Slås på av seg selv når det finnes en grense å telle mot; sett til false for å skru den av.`,category:`ui`}},events:{change:{type:`Event`,name:`change (Elements)`,description:`Returnerer valgt dato som streng i ISO-format. I range-modus utløses kun når begge datoer er valgt.`},"value-change":{type:`CustomEvent`,name:`value-change (Elements)`,description:`Returnerer en <code>array</code> med valgte datoer i ISO-format. I range-modus utløses kun når begge datoer er valgt.`},toggleHelpText:{type:`CustomEvent`,description:`Returnerer <code>event.detail { isOpen: true }</code> eller <code>event.detail { isOpen: false }</code> når hjelpeteksten åpnes eller lukkes`},onChange:{type:`Event`,name:`onChange (React)`,reactOnly:!0,description:`Utløses når en dato velges. <code>e.target.value</code> inneholder kommaseparerte ISO-datoer. I range-modus utløses kun når begge datoer er valgt.`},onValueChange:{type:`string[]`,name:`onValueChange (React)`,reactOnly:!0,description:`Returnerer en <code>string[]</code> med valgte datoer i ISO-format. I range-modus utløses kun når begge datoer er valgt.`}}},d=()=>{let e=navigator.userAgent;return!!(/iP(hone|od|ad)/.test(e)||/Macintosh/.test(e)&&`ontouchend`in document)},f=()=>d()?`text`:`date`,p=e=>!e||e.length!==2||t.u(e[0],e[1]),m=e=>t.h(e),h=(e,n,r,i,a)=>t.i(e,n,r,i,a),g=(e,t,n,r,i,a,o=`medium`)=>({"pkt-input":!0,"pkt-datepicker__input":!0,[`pkt-input--${o}`]:!0,"pkt-input--fullwidth":e,"pkt-datepicker--hasrangelabels":t,"pkt-datepicker--multiple":n,"pkt-datepicker--range":r,"ios-readonly-hack":i===!1&&a===`text`}),_=(e=`medium`)=>({"pkt-input-icon":!0,"pkt-btn":!0,"pkt-btn--icon-only":!0,"pkt-btn--tertiary":!0,[`pkt-btn--${e}`]:!0,"pkt-datepicker__calendar-button":!0}),v=e=>({"pkt-input-prefix":e,"pkt-hide":!e}),y=(e,t,n)=>!t&&!n?Array.isArray(e)?e[0]||``:e:Array.isArray(e)?e.join(`,`):e,b=(e,t,n=!1)=>{if(!e||!t)return;let r=t.parentElement?.getBoundingClientRect()||t.getBoundingClientRect(),i=n?r.height+30:r.height,a=e.getBoundingClientRect().height,o=n?`calc(100% - 30px)`:`100%`;r&&typeof window<`u`&&r.top+a>window.innerHeight&&r.top-a>0&&(o=`calc(100% - ${i}px - ${a}px)`),e.style.top=o},x=(e,t,n,r,i,a)=>{let{key:o}=e;o===`,`&&(e.preventDefault(),a?a(e):i&&i()),(o===`Space`||o===` `)&&(e.preventDefault(),t(e)),o===`Enter`&&(e.preventDefault(),n?n():r?r():i&&i())},S=(e,t)=>{let{key:n}=e;(n===`Enter`||n===` `||n===`Space`)&&(e.preventDefault(),t(e))},C={validateRangeOrder:p,sortDates:m,filterSelectableDates:h},w={getInputType:f},T={submitForm(e){let t=e.internals?.form;t&&t.requestSubmit()},submitFormOrFallback(e,t){let n=e?.form;n?n.requestSubmit():t()},validateDateInput(t,n,r,i,a){let o=t.value;if(!o)return;let s={...e.s.validation,...a};r&&r>o?n.setValidity({rangeUnderflow:!0},s.dateUnderflow,t):i&&i<o&&n.setValidity({rangeOverflow:!0},s.dateOverflow,t)}},E={addToSelected(e,n,r,i){let a=e.target;if(!a.value)return;let o=r?t.d(r):null,s=i?t.d(i):null,c=t.d(a.value.split(`,`)[0]);c&&!isNaN(c.getTime())&&(!o||c>=o)&&(!s||c<=s)&&n.value&&n.value.handleDateSelect(c),a.value=``},handleCalendarPosition(e,t,n=!1){b(e.value??null,t.value??null,n)}},D={getInputClasses:g,getButtonClasses:_,getRangeLabelClasses:v},O={processDateSelection:y,updateInputValues(e,t,n,r,i,a){e.value&&(r&&t?.value?(e.value.value=n[0]??``,t.value.value=n[1]??``,a(e.value),a(t.value)):i||(e.value.value=n.length?n[0]:``,a(e.value)))},processRangeBlur(e,n,r,i,a){let o=e.target;if(o.value){a(o);let e=t.s(o.value);e&&r?.value?.handleDateSelect(e)}else n[0]&&i()}},k={handleInputKeydown:x,handleButtonKeydown:S},A=class extends e.t{constructor(...e){super(...e),this.open=!1,this.multiple=!1,this.range=!1,this.weeknumbers=!1,this.withcontrols=!1,this.maxMultiple=null,this.selected=[],this.earliest=null,this.latest=null,this.excludedates=[],this.excludeweekdays=[],this.currentmonth=null,this.today=null,this._hasBeenOpened=!1,this.popupRef=r.t(),this.calendarRef=r.t(),this.handleDocumentClick=e=>{if(!this.open)return;let t=e.composedPath(),n=this.parentElement,r=this.popupRef.value;t.includes(this)||t.includes(r)||n&&t.includes(n)||(this.hide(),this.dispatchEvent(new CustomEvent(`close`,{bubbles:!0,composed:!0})))},this.handleDocumentKeydown=e=>{this.open&&e.key===`Escape`&&(this.hide(),this.dispatchEvent(new CustomEvent(`close`,{bubbles:!0,composed:!0})))}}firstUpdated(){this.calRef=this.calendarRef}willUpdate(e){super.willUpdate(e),e.has(`open`)&&this.open&&(this._hasBeenOpened=!0)}updated(e){super.updated(e),e.has(`open`)&&(this.open?(document.addEventListener(`keydown`,this.handleDocumentKeydown),document.addEventListener(`click`,this.handleDocumentClick)):(document.removeEventListener(`click`,this.handleDocumentClick),document.removeEventListener(`keydown`,this.handleDocumentKeydown)))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(`click`,this.handleDocumentClick),document.removeEventListener(`keydown`,this.handleDocumentKeydown)}show(){this.open=!0,this.calendarRef.value?.focus()}hide(){this.open=!1}toggle(){this.open?this.hide():this.show()}contains(e){return!!e&&!!this.popupRef.value?.contains(e)}focusOnCurrentDate(){let e=this.calendarRef.value;e&&typeof e.focusOnCurrentDate==`function`&&e.focusOnCurrentDate()}addToSelected(e,n,r){if(this.calendarRef.value&&typeof E.addToSelected==`function`)return E.addToSelected(e,this.calendarRef,n,r);let i=e.target;if(!i.value)return;let a=n?t.d(n):null,o=r?t.d(r):null,s=t.d(i.value.split(`,`)[0]);s&&!isNaN(s.getTime())&&(!a||s>=a)&&(!o||s<=o)&&this.handleDateSelect(s),i.value=``}handleDateSelect(e){let n=this.calendarRef.value;if(n&&typeof n.handleDateSelect==`function`)return n.handleDateSelect(e);let r=t.a(e),i=this.selected.indexOf(r)>=0?this.selected.filter(e=>e!==r):[...this.selected,r];this.selected=i,this.dispatchEvent(new CustomEvent(`date-selected`,{detail:i,bubbles:!0,composed:!0}))}render(){let t={"pkt-calendar-popup":!0,show:this.open,hide:!this.open};return e._`
|
|
13
13
|
<div
|
|
14
|
-
class="${
|
|
15
|
-
${
|
|
14
|
+
class="${i.t(t)}"
|
|
15
|
+
${r.n(this.popupRef)}
|
|
16
16
|
id="date-popup"
|
|
17
17
|
?hidden=${!this.open}
|
|
18
18
|
aria-hidden="${!this.open}"
|
|
19
19
|
>
|
|
20
20
|
${this.open||this._hasBeenOpened?e._`<pkt-calendar
|
|
21
|
-
${
|
|
21
|
+
${r.n(this.calendarRef)}
|
|
22
22
|
?multiple=${this.multiple}
|
|
23
23
|
?range=${this.range}
|
|
24
24
|
?weeknumbers=${this.weeknumbers}
|
|
@@ -35,9 +35,9 @@ const e=require("./element-CEarCnHH.cjs"),t=require("./class-map-C82GtM1w.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.hasError=!1,this.hasHelptext=!1,this.inputRef=
|
|
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=r.t(),this.btnRef=r.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
|
-
class="${
|
|
40
|
+
class="${i.t(D.getButtonClasses(this.inputSize))}"
|
|
41
41
|
type="button"
|
|
42
42
|
@click=${e=>this.dispatchToggleCalendar(e)}
|
|
43
43
|
@keydown=${e=>{let{key:t}=e;(t===`Enter`||t===` `||t===`Space`)&&(e.preventDefault(),this.dispatchToggleCalendar(e))}}
|
|
@@ -50,17 +50,17 @@ const e=require("./element-CEarCnHH.cjs"),t=require("./class-map-C82GtM1w.cjs"),
|
|
|
50
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
|
-
class="${
|
|
53
|
+
class="${i.t(this.inputClasses)}"
|
|
54
54
|
.type=${this.inputType}
|
|
55
55
|
id="${this.id}-input"
|
|
56
56
|
.value=${this.value}
|
|
57
|
-
min=${
|
|
58
|
-
max=${
|
|
59
|
-
placeholder=${
|
|
57
|
+
min=${s.t(this.min)}
|
|
58
|
+
max=${s.t(this.max)}
|
|
59
|
+
placeholder=${s.t(this.placeholder)}
|
|
60
60
|
?readonly=${this.isInputReadonly}
|
|
61
|
-
aria-describedby=${
|
|
61
|
+
aria-describedby=${s.t(this.describedBy)}
|
|
62
62
|
aria-invalid=${this.hasError}
|
|
63
|
-
aria-errormessage=${
|
|
63
|
+
aria-errormessage=${s.t(this.errorMessageId)}
|
|
64
64
|
@click=${e=>{e.preventDefault(),this.dispatchToggleCalendar(e)}}
|
|
65
65
|
@touchend=${e=>{e.preventDefault(),this.dispatchToggleCalendar(e)}}
|
|
66
66
|
?disabled=${this.disabled}
|
|
@@ -69,25 +69,25 @@ const e=require("./element-CEarCnHH.cjs"),t=require("./class-map-C82GtM1w.cjs"),
|
|
|
69
69
|
@focus=${()=>{this.dispatchFocus(),d()&&this.dispatchToggleCalendar(new Event(`focus`))}}
|
|
70
70
|
@blur=${e=>{this.dispatchBlur(e),this.dispatchManageValidity(e.target),this.dispatchEvent(new CustomEvent(`value-change`,{detail:e.target.value,bubbles:!0,composed:!0}))}}
|
|
71
71
|
@change=${e=>{this.dispatchChange(e),e.stopImmediatePropagation()}}
|
|
72
|
-
${
|
|
72
|
+
${r.n(this.inputRef)}
|
|
73
73
|
/>
|
|
74
74
|
${this.renderCalendarButton()}
|
|
75
75
|
</div>
|
|
76
|
-
`}};e.n([e.u({type:String})],M.prototype,`value`,void 0);try{e.d(`pkt-datepicker-single`)(M)}catch{console.warn(`Forsøker å definere <pkt-datepicker-single>, men den er allerede definert`)}var N=class extends j{constructor(...e){super(...e),this.value=[],this.label=``,this.showRangeLabels=!1,this.inputRefTo=
|
|
76
|
+
`}};e.n([e.u({type:String})],M.prototype,`value`,void 0);try{e.d(`pkt-datepicker-single`)(M)}catch{console.warn(`Forsøker å definere <pkt-datepicker-single>, men den er allerede definert`)}var N=class extends j{constructor(...e){super(...e),this.value=[],this.label=``,this.showRangeLabels=!1,this.inputRefTo=r.t()}get inputElementTo(){return this.inputRefTo.value}render(){let t=D.getRangeLabelClasses(this.showRangeLabels);return e._`
|
|
77
77
|
<div class="pkt-input__container">
|
|
78
78
|
${this.showRangeLabels?e._` <div class="pkt-input-prefix">${this.pktStrings.get(`generic`).from}</div> `:e.h}
|
|
79
79
|
<input
|
|
80
|
-
aria-describedby=${
|
|
80
|
+
aria-describedby=${s.t(this.describedBy)}
|
|
81
81
|
aria-invalid=${this.hasError}
|
|
82
|
-
aria-errormessage=${
|
|
83
|
-
class=${
|
|
82
|
+
aria-errormessage=${s.t(this.errorMessageId)}
|
|
83
|
+
class=${i.t(this.inputClasses)}
|
|
84
84
|
.type=${this.inputType}
|
|
85
85
|
id="${this.id}-input"
|
|
86
86
|
aria-label="${this.label} ${this.pktStrings.get(`generic`).from}"
|
|
87
87
|
.value=${this.value[0]??``}
|
|
88
|
-
min=${
|
|
89
|
-
max=${
|
|
90
|
-
placeholder=${
|
|
88
|
+
min=${s.t(this.min)}
|
|
89
|
+
max=${s.t(this.max)}
|
|
90
|
+
placeholder=${s.t(this.placeholder)}
|
|
91
91
|
?readonly=${this.isInputReadonly}
|
|
92
92
|
?disabled=${this.disabled}
|
|
93
93
|
@click=${e=>{e.preventDefault(),this.dispatchToggleCalendar(e)}}
|
|
@@ -97,24 +97,24 @@ const e=require("./element-CEarCnHH.cjs"),t=require("./class-map-C82GtM1w.cjs"),
|
|
|
97
97
|
@focus=${()=>{this.dispatchFocus(),d()&&this.dispatchToggleCalendar(new Event(`focus`))}}
|
|
98
98
|
@blur=${e=>{this.dispatchBlur(e),this.dispatchEvent(new CustomEvent(`range-blur`,{detail:{event:e,values:this.value,inputType:`from`},bubbles:!0,composed:!0}))}}
|
|
99
99
|
@change=${e=>{this.dispatchChange(e),e.stopImmediatePropagation()}}
|
|
100
|
-
${
|
|
100
|
+
${r.n(this.inputRef)}
|
|
101
101
|
/>
|
|
102
|
-
<div class="${
|
|
102
|
+
<div class="${i.t(t)}" id="${this.id}-to-label">
|
|
103
103
|
${this.pktStrings.get(`generic`).to}
|
|
104
104
|
</div>
|
|
105
105
|
${this.showRangeLabels?e.h:e._` <div class="pkt-input-separator">–</div> `}
|
|
106
106
|
<input
|
|
107
|
-
aria-describedby=${
|
|
107
|
+
aria-describedby=${s.t(this.describedBy)}
|
|
108
108
|
aria-invalid=${this.hasError}
|
|
109
|
-
aria-errormessage=${
|
|
110
|
-
class=${
|
|
109
|
+
aria-errormessage=${s.t(this.errorMessageId)}
|
|
110
|
+
class=${i.t(this.inputClasses)}
|
|
111
111
|
.type=${this.inputType}
|
|
112
112
|
id="${this.id}-to"
|
|
113
113
|
aria-label="${this.label} ${this.pktStrings.get(`generic`).to}"
|
|
114
114
|
.value=${this.value[1]??``}
|
|
115
|
-
min=${
|
|
116
|
-
max=${
|
|
117
|
-
placeholder=${
|
|
115
|
+
min=${s.t(this.min)}
|
|
116
|
+
max=${s.t(this.max)}
|
|
117
|
+
placeholder=${s.t(this.placeholder)}
|
|
118
118
|
?readonly=${this.isInputReadonly}
|
|
119
119
|
?disabled=${this.disabled}
|
|
120
120
|
@click=${e=>{e.preventDefault(),this.dispatchToggleCalendar(e)}}
|
|
@@ -124,22 +124,22 @@ const e=require("./element-CEarCnHH.cjs"),t=require("./class-map-C82GtM1w.cjs"),
|
|
|
124
124
|
@focus=${()=>{this.dispatchFocus(),d()&&this.dispatchToggleCalendar(new Event(`focus`))}}
|
|
125
125
|
@blur=${e=>{this.dispatchBlur(e),this.dispatchEvent(new CustomEvent(`range-blur`,{detail:{event:e,values:this.value,inputType:`to`},bubbles:!0,composed:!0}))}}
|
|
126
126
|
@change=${e=>{this.dispatchChange(e),e.stopImmediatePropagation()}}
|
|
127
|
-
${
|
|
127
|
+
${r.n(this.inputRefTo)}
|
|
128
128
|
/>
|
|
129
129
|
${this.renderCalendarButton()}
|
|
130
130
|
</div>
|
|
131
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._`
|
|
132
132
|
<div class="pkt-input__container">
|
|
133
133
|
<input
|
|
134
|
-
aria-describedby=${
|
|
134
|
+
aria-describedby=${s.t(this.describedBy)}
|
|
135
135
|
aria-invalid=${this.hasError}
|
|
136
|
-
aria-errormessage=${
|
|
137
|
-
class=${
|
|
136
|
+
aria-errormessage=${s.t(this.errorMessageId)}
|
|
137
|
+
class=${i.t(this.inputClasses)}
|
|
138
138
|
.type=${this.inputType}
|
|
139
139
|
id="${this.id}-input"
|
|
140
|
-
min=${
|
|
141
|
-
max=${
|
|
142
|
-
placeholder=${
|
|
140
|
+
min=${s.t(this.min)}
|
|
141
|
+
max=${s.t(this.max)}
|
|
142
|
+
placeholder=${s.t(this.placeholder)}
|
|
143
143
|
?readonly=${this.isInputReadonly}
|
|
144
144
|
?disabled=${this.isInputDisabled}
|
|
145
145
|
@click=${e=>{e.preventDefault(),this.dispatchToggleCalendar(e)}}
|
|
@@ -149,11 +149,11 @@ const e=require("./element-CEarCnHH.cjs"),t=require("./class-map-C82GtM1w.cjs"),
|
|
|
149
149
|
@focus=${()=>{this.dispatchFocus(),d()&&this.dispatchToggleCalendar(new Event(`focus`))}}
|
|
150
150
|
@keydown=${e=>k.handleInputKeydown(e,e=>this.dispatchToggleCalendar(e),()=>T.submitFormOrFallback(this.internals,()=>this.inputRef.value?.blur()),void 0,void 0,e=>this.dispatchAddToSelected(e))}
|
|
151
151
|
@change=${e=>{this.dispatchChange(e),e.stopImmediatePropagation()}}
|
|
152
|
-
${
|
|
152
|
+
${r.n(this.inputRef)}
|
|
153
153
|
/>
|
|
154
154
|
${this.renderCalendarButton()}
|
|
155
155
|
</div>
|
|
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,I=class
|
|
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,I=class i extends n.t{constructor(...e){super(...e),this._valueProperty=``,this.datepickerPopupRef=r.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=r.t(),this.popupRef=r.t(),this.singleInputRef=r.t(),this.rangeInputRef=r.t(),this.multipleInputRef=r.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 n=t.r(this._valueProperty),r=this.multiple&&n.length>1?C.filterSelectableDates(n,this.min,this.max,this.excludedates,this.excludeweekdays):n;this.range&&!C.validateRangeOrder(r)?(this._valueProperty=``,this.getAttribute(`value`)&&this.setAttribute(`value`,``),super.valueChanged(``,e),this._value=[]):(this._valueProperty=t.n(r),this.range&&r.length===1||super.valueChanged(this._valueProperty,e),this._value=r)}attributeChangedCallback(e,n,r){e===`excludedates`&&typeof this.excludedates==`string`&&(this.excludedates=t.r(r||``)),e===`excludeweekdays`&&typeof this.excludeweekdays==`string`&&(this.excludeweekdays=t.r(r||``)),super.attributeChangedCallback(e,n,r)}willUpdate(e){if(super.willUpdate(e),i.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._`
|
|
157
157
|
<pkt-datepicker-single
|
|
158
158
|
.value=${this._value[0]??``}
|
|
159
159
|
.inputType=${this.inputType}
|
|
@@ -176,7 +176,7 @@ const e=require("./element-CEarCnHH.cjs"),t=require("./class-map-C82GtM1w.cjs"),
|
|
|
176
176
|
@manage-validity=${e=>this.manageValidity(e.detail)}
|
|
177
177
|
@value-change=${e=>{this.value=e.detail}}
|
|
178
178
|
@input-changed=${()=>{this.touched=!0}}
|
|
179
|
-
${
|
|
179
|
+
${r.n(this.singleInputRef)}
|
|
180
180
|
></pkt-datepicker-single>
|
|
181
181
|
`}renderRangeInput(){return e._`
|
|
182
182
|
<pkt-datepicker-range
|
|
@@ -203,9 +203,9 @@ const e=require("./element-CEarCnHH.cjs"),t=require("./class-map-C82GtM1w.cjs"),
|
|
|
203
203
|
@range-blur=${e=>{let t=this.currentInputElement,n=this.currentInputElementTo;if(t&&n){let e=t.value,r=n.value;if(e&&r&&e>r)n.value=``,this._value=[e],this.value=e;else{let t=[e,r].filter(Boolean);t.length>0&&(t[0]!==this._value[0]||t[1]!==this._value[1])&&(this._value=t,this.value=t.join(`,`))}}O.processRangeBlur(e.detail.event,e.detail.values,this.calRef,()=>this.clearInputValue(),e=>this.manageValidity(e))}}
|
|
204
204
|
@manage-validity=${e=>this.manageValidity(e.detail)}
|
|
205
205
|
@validate-date-input=${e=>{T.validateDateInput(e.detail,this.internals,this.min,this.max,this.pktStrings.get(`validation`))}}
|
|
206
|
-
@handle-date-select=${e=>{let t
|
|
206
|
+
@handle-date-select=${e=>{let n=t.s(e.detail);if(n){let e=t.a(n);this._value[0]!==e&&this._value[1]!==e&&this.calRef?.value?.handleDateSelect(n)}}}
|
|
207
207
|
@input-changed=${()=>{this.touched=!0}}
|
|
208
|
-
${
|
|
208
|
+
${r.n(this.rangeInputRef)}
|
|
209
209
|
></pkt-datepicker-range>
|
|
210
210
|
`}renderMultipleInput(){return e._`
|
|
211
211
|
<pkt-datepicker-multiple
|
|
@@ -230,7 +230,7 @@ const e=require("./element-CEarCnHH.cjs"),t=require("./class-map-C82GtM1w.cjs"),
|
|
|
230
230
|
@input-blur=${e=>{this.calRef.value?.contains(e.detail.relatedTarget)||this.onBlur()}}
|
|
231
231
|
@add-to-selected=${e=>this.addToSelected(e.detail)}
|
|
232
232
|
@input-changed=${()=>{this.touched=!0}}
|
|
233
|
-
${
|
|
233
|
+
${r.n(this.multipleInputRef)}
|
|
234
234
|
></pkt-datepicker-multiple>
|
|
235
235
|
`}renderCalendar(){return e._`
|
|
236
236
|
<pkt-datepicker-popup
|
|
@@ -246,15 +246,15 @@ const e=require("./element-CEarCnHH.cjs"),t=require("./class-map-C82GtM1w.cjs"),
|
|
|
246
246
|
.latest=${this.max}
|
|
247
247
|
.excludedates=${Array.isArray(this.excludedates)?this.excludedates:this.excludedates.split(`,`)}
|
|
248
248
|
.excludeweekdays=${this.excludeweekdays}
|
|
249
|
-
.currentmonth=${this.currentmonth?
|
|
249
|
+
.currentmonth=${this.currentmonth?t.m(this.currentmonth):null}
|
|
250
250
|
.today=${this.today}
|
|
251
251
|
@date-selected=${e=>{this.value=O.processDateSelection(e.detail,this.multiple,this.range),this._value=e.detail,O.updateInputValues(this.inputRef,this.inputRefTo,this._value,this.range,this.multiple,e=>this.manageValidity(e))}}
|
|
252
252
|
@close=${()=>{this.onBlur(),this.hideCalendar()}}
|
|
253
|
-
${
|
|
253
|
+
${r.n(this.datepickerPopupRef)}
|
|
254
254
|
></pkt-datepicker-popup>
|
|
255
255
|
`}render(){return this.inputClasses=D.getInputClasses(this.fullwidth,this.showRangeLabels,this.multiple,this.range,this.readonly,this.inputType,this.inputSize),e._`
|
|
256
256
|
<pkt-input-wrapper
|
|
257
|
-
${
|
|
257
|
+
${c.n(this,[`helptext`])}
|
|
258
258
|
.strings=${this.strings}
|
|
259
259
|
label="${this.label}"
|
|
260
260
|
forId="${this.id}-input"
|
|
@@ -284,11 +284,11 @@ const e=require("./element-CEarCnHH.cjs"),t=require("./class-map-C82GtM1w.cjs"),
|
|
|
284
284
|
dateformat=${this.dateformat}
|
|
285
285
|
strings=${this.strings}
|
|
286
286
|
id-base=${this.id}
|
|
287
|
-
@date-tag-removed=${e=>{let
|
|
287
|
+
@date-tag-removed=${e=>{let n=this.datepickerPopupRef.value,r=t.s(e.detail);n&&r&&typeof n.handleDateSelect==`function`?n.handleDateSelect(r):this.calRef.value?.handleDateSelect(r)}}
|
|
288
288
|
></pkt-date-tags>`:e.h}
|
|
289
289
|
<div class="pkt-datepicker__inputs ${this.range?`pkt-input__range-inputs`:``}">
|
|
290
290
|
${this.range?this.renderRangeInput():this.multiple?this.renderMultipleInput():this.renderInput()}
|
|
291
291
|
</div>
|
|
292
292
|
</pkt-input-wrapper>
|
|
293
293
|
${this.renderCalendar()}
|
|
294
|
-
`}handleCalendarPosition(){let e=this.multiple&&!!this.maxlength;E.handleCalendarPosition(this.popupRef,this.inputRef,e)}async showCalendar(){let e=this.datepickerPopupRef.value;this.calendarOpen=!0,e&&typeof e.show==`function`?(e.show(),d()&&e.focusOnCurrentDate()):(await
|
|
294
|
+
`}handleCalendarPosition(){let e=this.multiple&&!!this.maxlength;E.handleCalendarPosition(this.popupRef,this.inputRef,e)}async showCalendar(){let e=this.datepickerPopupRef.value;this.calendarOpen=!0,e&&typeof e.show==`function`?(e.show(),d()&&e.focusOnCurrentDate()):(await o.t(20),this.handleCalendarPosition(),d()&&this.calRef.value?.focusOnCurrentDate())}hideCalendar(){let e=this.datepickerPopupRef.value;if(this.calendarOpen=!1,e&&typeof e.hide==`function`)return e.hide()}async toggleCalendar(e){e.preventDefault();let t=this.datepickerPopupRef.value;if(t&&typeof t.toggle==`function`){let e=!!t.open;t.toggle(),this.calendarOpen=!e}else this.calendarOpen?this.hideCalendar():this.showCalendar()}clearInputValue(){this._value=[],this.value=``,this.setFormValue(this.value),this.dispatchEvent(new Event(`change`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`value-change`,{detail:this._value,bubbles:!0,composed:!0}))}};F=I,F.DERIVED_FROM=[`value`,`multiple`,`range`,`min`,`max`,`excludedates`,`excludeweekdays`],e.n([e.u({type:String,reflect:!0})],I.prototype,`value`,null),e.n([e.l()],I.prototype,`_value`,void 0),e.n([e.u({type:String,reflect:!0})],I.prototype,`label`,void 0),e.n([e.u({type:String})],I.prototype,`dateformat`,void 0),e.n([e.u({type:Boolean,reflect:!0})],I.prototype,`multiple`,void 0),e.n([e.u({type:Number,reflect:!0})],I.prototype,`maxlength`,void 0),e.n([e.u({type:Boolean,reflect:!0})],I.prototype,`range`,void 0),e.n([e.u({type:Boolean,attribute:`show-range-labels`})],I.prototype,`showRangeLabels`,void 0),e.n([e.u({type:String,reflect:!0})],I.prototype,`min`,void 0),e.n([e.u({type:String,reflect:!0})],I.prototype,`max`,void 0),e.n([e.u({type:Boolean})],I.prototype,`weeknumbers`,void 0),e.n([e.u({type:Boolean,reflect:!0})],I.prototype,`withcontrols`,void 0),e.n([e.u({converter:t.t.csvToArray})],I.prototype,`excludedates`,void 0),e.n([e.u({converter:t.t.csvToArray})],I.prototype,`excludeweekdays`,void 0),e.n([e.u({type:String})],I.prototype,`currentmonth`,void 0),e.n([e.u({type:String})],I.prototype,`today`,void 0),e.n([e.u({type:Boolean,reflect:!0,attribute:`calendar-open`})],I.prototype,`calendarOpen`,void 0),e.n([e.u({type:String})],I.prototype,`timezone`,void 0),e.n([e.l()],I.prototype,`inputClasses`,void 0);try{e.d(`pkt-datepicker`)(I)}catch{console.warn(`Forsøker å definere <pkt-datepicker>, men den er allerede definert`)}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return P}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return I}});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
// ../../node_modules/dialog-polyfill/dist/dialog-polyfill.esm.js
|
|
2
2
|
var e = window.CustomEvent;
|
|
3
|
-
|
|
3
|
+
e && typeof e != "object" || (e = function(e, t) {
|
|
4
4
|
t ||= {};
|
|
5
5
|
var n = document.createEvent("CustomEvent");
|
|
6
6
|
return n.initCustomEvent(e, !!t.bubbles, !!t.cancelable, t.detail || null), n;
|
|
@@ -276,5 +276,4 @@ if (f.reposition = function(e) {
|
|
|
276
276
|
};
|
|
277
277
|
HTMLFormElement.prototype.submit = v;
|
|
278
278
|
}
|
|
279
|
-
//#endregion
|
|
280
279
|
export { f as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=window.CustomEvent;e&&typeof e!=`object`||(e=function(e,t){t||={};var n=document.createEvent(`CustomEvent`);return n.initCustomEvent(e,!!t.bubbles,!!t.cancelable,t.detail||null),n},e.prototype=window.Event.prototype);function t(e,t){var n=`on`+t.type.toLowerCase();return typeof e[n]==`function`&&e[n](t),e.dispatchEvent(t)}function n(e){for(;e&&e!==document.body;){var t=window.getComputedStyle(e),n=function(e,n){return t[e]!==void 0&&t[e]!==n};if(t.opacity<1||n(`zIndex`,`auto`)||n(`transform`,`none`)||n(`mixBlendMode`,`normal`)||n(`filter`,`none`)||n(`perspective`,`none`)||t.isolation===`isolate`||t.position===`fixed`||t.webkitOverflowScrolling===`touch`)return!0;e=e.parentElement}return!1}function r(e){for(;e;){if(e.localName===`dialog`)return e;e=e.parentElement?e.parentElement:e.parentNode?e.parentNode.host:null}return null}function i(e){for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;e&&e.blur&&e!==document.body&&e.blur()}function a(e,t){for(var n=0;n<e.length;++n)if(e[n]===t)return!0;return!1}function o(e){return!e||!e.hasAttribute(`method`)?!1:e.getAttribute(`method`).toLowerCase()===`dialog`}function s(e){var t=[`button`,`input`,`keygen`,`select`,`textarea`].map(function(e){return e+`:not([disabled])`});t.push(`[tabindex]:not([disabled]):not([tabindex=""])`);var n=e.querySelector(t.join(`, `));if(!n&&`attachShadow`in Element.prototype)for(var r=e.querySelectorAll(`*`),i=0;i<r.length&&!(r[i].tagName&&r[i].shadowRoot&&(n=s(r[i].shadowRoot),n));i++);return n}function c(e){return e.isConnected||document.body.contains(e)}function l(e){if(e.submitter)return e.submitter;var t=e.target;if(!(t instanceof HTMLFormElement))return null;var n=f.formSubmitter;if(!n){var r=e.target;n=(`getRootNode`in r&&r.getRootNode()||document).activeElement}return!n||n.form!==t?null:n}function u(e){if(!e.defaultPrevented){var t=e.target,n=f.imagemapUseValue,i=l(e);n===null&&i&&(n=i.value);var a=r(t);a&&(i&&i.getAttribute(`formmethod`)||t.getAttribute(`method`))===`dialog`&&(e.preventDefault(),n==null?a.close():a.close(n))}}function d(e){if(this.dialog_=e,this.replacedStyleTop_=!1,this.openAsModal_=!1,e.hasAttribute(`role`)||e.setAttribute(`role`,`dialog`),e.show=this.show.bind(this),e.showModal=this.showModal.bind(this),e.close=this.close.bind(this),e.addEventListener(`submit`,u,!1),`returnValue`in e||(e.returnValue=``),`MutationObserver`in window)new MutationObserver(this.maybeHideModal.bind(this)).observe(e,{attributes:!0,attributeFilter:[`open`]});else{var t=!1,n=function(){t?this.downgradeModal():this.maybeHideModal(),t=!1}.bind(this),r,i=function(i){if(i.target===e){var a=`DOMNodeRemoved`;t|=i.type.substr(0,a.length)===a,window.clearTimeout(r),r=window.setTimeout(n,0)}};[`DOMAttrModified`,`DOMNodeRemoved`,`DOMNodeRemovedFromDocument`].forEach(function(t){e.addEventListener(t,i)})}Object.defineProperty(e,"open",{set:this.setOpen.bind(this),get:e.hasAttribute.bind(e,`open`)}),this.backdrop_=document.createElement(`div`),this.backdrop_.className=`backdrop`,this.backdrop_.addEventListener(`mouseup`,this.backdropMouseEvent_.bind(this)),this.backdrop_.addEventListener(`mousedown`,this.backdropMouseEvent_.bind(this)),this.backdrop_.addEventListener(`click`,this.backdropMouseEvent_.bind(this))}d.prototype={get dialog(){return this.dialog_},maybeHideModal:function(){this.dialog_.hasAttribute(`open`)&&c(this.dialog_)||this.downgradeModal()},downgradeModal:function(){this.openAsModal_&&(this.openAsModal_=!1,this.dialog_.style.zIndex=``,this.replacedStyleTop_&&=(this.dialog_.style.top=``,!1),this.backdrop_.parentNode&&this.backdrop_.parentNode.removeChild(this.backdrop_),f.dm.removeDialog(this))},setOpen:function(e){e?this.dialog_.hasAttribute(`open`)||this.dialog_.setAttribute(`open`,``):(this.dialog_.removeAttribute(`open`),this.maybeHideModal())},backdropMouseEvent_:function(e){if(this.dialog_.hasAttribute(`tabindex`))this.dialog_.focus();else{var t=document.createElement(`div`);this.dialog_.insertBefore(t,this.dialog_.firstChild),t.tabIndex=-1,t.focus(),this.dialog_.removeChild(t)}var n=document.createEvent(`MouseEvents`);n.initMouseEvent(e.type,e.bubbles,e.cancelable,window,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget),this.dialog_.dispatchEvent(n),e.stopPropagation()},focus_:function(){var e=this.dialog_.querySelector(`[autofocus]:not([disabled])`);!e&&this.dialog_.tabIndex>=0&&(e=this.dialog_),e||=s(this.dialog_),i(document.activeElement),e&&e.focus()},updateZIndex:function(e,t){if(e<t)throw Error(`dialogZ should never be < backdropZ`);this.dialog_.style.zIndex=e,this.backdrop_.style.zIndex=t},show:function(){this.dialog_.open||(this.setOpen(!0),this.focus_())},showModal:function(){if(this.dialog_.hasAttribute(`open`))throw Error(`Failed to execute 'showModal' on dialog: The element is already open, and therefore cannot be opened modally.`);if(!c(this.dialog_))throw Error(`Failed to execute 'showModal' on dialog: The element is not in a Document.`);if(!f.dm.pushDialog(this))throw Error(`Failed to execute 'showModal' on dialog: There are too many open modal dialogs.`);n(this.dialog_.parentElement)&&console.warn(`A dialog is being shown inside a stacking context. This may cause it to be unusable. For more information, see this link: https://github.com/GoogleChrome/dialog-polyfill/#stacking-context`),this.setOpen(!0),this.openAsModal_=!0,f.needsCentering(this.dialog_)?(f.reposition(this.dialog_),this.replacedStyleTop_=!0):this.replacedStyleTop_=!1,this.dialog_.parentNode.insertBefore(this.backdrop_,this.dialog_.nextSibling),this.focus_()},close:function(n){if(!this.dialog_.hasAttribute(`open`))throw Error(`Failed to execute 'close' on dialog: The element does not have an 'open' attribute, and therefore cannot be closed.`);this.setOpen(!1),n!==void 0&&(this.dialog_.returnValue=n);var r=new e(`close`,{bubbles:!1,cancelable:!1});t(this.dialog_,r)}};var f={};if(f.reposition=function(e){var t=document.body.scrollTop||document.documentElement.scrollTop,n=t+(window.innerHeight-e.offsetHeight)/2;e.style.top=Math.max(t,n)+`px`},f.isInlinePositionSetByStylesheet=function(e){for(var t=0;t<document.styleSheets.length;++t){var n=document.styleSheets[t],r=null;try{r=n.cssRules}catch{}if(r)for(var i=0;i<r.length;++i){var o=r[i],s=null;try{s=document.querySelectorAll(o.selectorText)}catch{}if(s&&a(s,e)){var c=o.style.getPropertyValue(`top`),l=o.style.getPropertyValue(`bottom`);if(c&&c!==`auto`||l&&l!==`auto`)return!0}}}return!1},f.needsCentering=function(e){return window.getComputedStyle(e).position!==`absolute`||e.style.top!==`auto`&&e.style.top!==``||e.style.bottom!==`auto`&&e.style.bottom!==``?!1:!f.isInlinePositionSetByStylesheet(e)},f.forceRegisterDialog=function(e){if((window.HTMLDialogElement||e.showModal)&&console.warn(`This browser already supports <dialog>, the polyfill may not work correctly`,e),e.localName!==`dialog`)throw Error(`Failed to register dialog: The element is not a dialog.`);new d(e)},f.registerDialog=function(e){e.showModal||f.forceRegisterDialog(e)},f.DialogManager=function(){this.pendingDialogStack=[];var e=this.checkDOM_.bind(this);this.overlay=document.createElement(`div`),this.overlay.className=`_dialog_overlay`,this.overlay.addEventListener(`click`,function(t){this.forwardTab_=void 0,t.stopPropagation(),e([])}.bind(this)),this.handleKey_=this.handleKey_.bind(this),this.handleFocus_=this.handleFocus_.bind(this),this.zIndexLow_=1e5,this.zIndexHigh_=100150,this.forwardTab_=void 0,`MutationObserver`in window&&(this.mo_=new MutationObserver(function(t){var n=[];t.forEach(function(e){for(var t=0,r;r=e.removedNodes[t];++t){if(r instanceof Element)r.localName===`dialog`&&n.push(r);else continue;n=n.concat(r.querySelectorAll(`dialog`))}}),n.length&&e(n)}))},f.DialogManager.prototype.blockDocument=function(){document.documentElement.addEventListener(`focus`,this.handleFocus_,!0),document.addEventListener(`keydown`,this.handleKey_),this.mo_&&this.mo_.observe(document,{childList:!0,subtree:!0})},f.DialogManager.prototype.unblockDocument=function(){document.documentElement.removeEventListener(`focus`,this.handleFocus_,!0),document.removeEventListener(`keydown`,this.handleKey_),this.mo_&&this.mo_.disconnect()},f.DialogManager.prototype.updateStacking=function(){for(var e=this.zIndexHigh_,t=0,n;n=this.pendingDialogStack[t];++t)n.updateZIndex(--e,--e),t===0&&(this.overlay.style.zIndex=--e);var r=this.pendingDialogStack[0];r?(r.dialog.parentNode||document.body).appendChild(this.overlay):this.overlay.parentNode&&this.overlay.parentNode.removeChild(this.overlay)},f.DialogManager.prototype.containedByTopDialog_=function(e){for(;e=r(e);){for(var t=0,n;n=this.pendingDialogStack[t];++t)if(n.dialog===e)return t===0;e=e.parentElement}return!1},f.DialogManager.prototype.handleFocus_=function(e){var t=e.composedPath?e.composedPath()[0]:e.target;if(!this.containedByTopDialog_(t)&&document.activeElement!==document.documentElement&&(e.preventDefault(),e.stopPropagation(),i(t),this.forwardTab_!==void 0)){var n=this.pendingDialogStack[0];return n.dialog.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING&&(this.forwardTab_?n.focus_():t!==document.documentElement&&document.documentElement.focus()),!1}},f.DialogManager.prototype.handleKey_=function(n){if(this.forwardTab_=void 0,n.keyCode===27){n.preventDefault(),n.stopPropagation();var r=new e(`cancel`,{bubbles:!1,cancelable:!0}),i=this.pendingDialogStack[0];i&&t(i.dialog,r)&&i.dialog.close()}else n.keyCode===9&&(this.forwardTab_=!n.shiftKey)},f.DialogManager.prototype.checkDOM_=function(e){this.pendingDialogStack.slice().forEach(function(t){e.indexOf(t.dialog)===-1?t.maybeHideModal():t.downgradeModal()})},f.DialogManager.prototype.pushDialog=function(e){var t=(this.zIndexHigh_-this.zIndexLow_)/2-1;return this.pendingDialogStack.length>=t?!1:(this.pendingDialogStack.unshift(e)===1&&this.blockDocument(),this.updateStacking(),!0)},f.DialogManager.prototype.removeDialog=function(e){var t=this.pendingDialogStack.indexOf(e);t!==-1&&(this.pendingDialogStack.splice(t,1),this.pendingDialogStack.length===0&&this.unblockDocument(),this.updateStacking())},f.dm=new f.DialogManager,f.formSubmitter=null,f.imagemapUseValue=null,window.HTMLDialogElement===void 0){var p=document.createElement(`form`);if(p.setAttribute(`method`,`dialog`),p.method!==`dialog`){var m=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,`method`);if(m){var h=m.get;m.get=function(){return o(this)?`dialog`:h.call(this)};var g=m.set;m.set=function(e){return typeof e==`string`&&e.toLowerCase()===`dialog`?this.setAttribute(`method`,e):g.call(this,e)},Object.defineProperty(HTMLFormElement.prototype,"method",m)}}document.addEventListener(`click`,function(e){if(f.formSubmitter=null,f.imagemapUseValue=null,!e.defaultPrevented){var t=e.target;if(`composedPath`in e&&(t=e.composedPath().shift()||t),t&&o(t.form)){if(!(t.type===`submit`&&[`button`,`input`].indexOf(t.localName)>-1)){if(t.localName!==`input`||t.type!==`image`)return;f.imagemapUseValue=e.offsetX+`,`+e.offsetY}r(t)&&(f.formSubmitter=t)}}},!1),document.addEventListener(`submit`,function(e){var t=e.target;if(!r(t)){var n=l(e);(n&&n.getAttribute(`formmethod`)||t.getAttribute(`method`))===`dialog`&&e.preventDefault()}});var _=HTMLFormElement.prototype.submit,v=function(){if(!o(this))return _.call(this);var e=r(this);e&&e.close()};HTMLFormElement.prototype.submit=v}exports.default=f;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { v as e } from "./element-
|
|
2
|
-
|
|
1
|
+
import { v as e } from "./element-Bwc-likm.js";
|
|
2
|
+
// ../../node_modules/lit-html/directive-helpers.js
|
|
3
3
|
var { I: t } = e, n = (e) => e, r = (e) => e.strings === void 0, i = () => document.createComment(""), a = (e, r, a) => {
|
|
4
4
|
let o = e._$AA.parentNode, s = r === void 0 ? e._$AB : r._$AA;
|
|
5
5
|
if (a === void 0) a = new t(o.insertBefore(i(), s), o.insertBefore(i(), s), e, e.options);
|
|
@@ -21,5 +21,4 @@ var { I: t } = e, n = (e) => e, r = (e) => e.strings === void 0, i = () => docum
|
|
|
21
21
|
}, o = (e, t, n = e) => (e._$AI(t, n), e), s = {}, c = (e, t = s) => e._$AH = t, l = (e) => e._$AH, u = (e) => {
|
|
22
22
|
e._$AR(), e._$AA.remove();
|
|
23
23
|
};
|
|
24
|
-
//#endregion
|
|
25
24
|
export { o as a, r as i, u as n, a as o, c as r, l as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// ../../node_modules/lit-html/lit-html.js
|
|
2
2
|
var e = globalThis, t = (e) => e, n = e.trustedTypes, r = n ? n.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, i = "$lit$", a = `lit$${Math.random().toFixed(9).slice(2)}$`, o = "?" + a, s = `<${o}>`, c = document, l = () => c.createComment(""), u = (e) => e === null || typeof e != "object" && typeof e != "function", d = Array.isArray, f = (e) => d(e) || typeof e?.[Symbol.iterator] == "function", p = "[ \n\f\r]", m = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, h = /-->/g, g = />/g, _ = RegExp(`>|${p}(?:([^\\s"'>=/]+)(${p}*=${p}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"), v = /'/g, y = /"/g, b = /^(?:script|style|textarea|title)$/i, x = ((e) => (t, ...n) => ({
|
|
3
3
|
_$litType$: e,
|
|
4
4
|
strings: t,
|
|
@@ -520,8 +520,7 @@ var W = class extends HTMLElement {
|
|
|
520
520
|
firstUpdated(e) {}
|
|
521
521
|
};
|
|
522
522
|
W.elementStyles = [], W.shadowRootOptions = { mode: "open" }, W[V("elementProperties")] = /* @__PURE__ */ new Map(), W[V("finalized")] = /* @__PURE__ */ new Map(), be?.({ ReactiveElement: W }), (z.reactiveElementVersions ??= []).push("2.1.2");
|
|
523
|
-
|
|
524
|
-
//#region ../../node_modules/@lit/reactive-element/decorators/property.js
|
|
523
|
+
// ../../node_modules/@lit/reactive-element/decorators/property.js
|
|
525
524
|
var Se = {
|
|
526
525
|
attribute: !0,
|
|
527
526
|
type: String,
|
|
@@ -557,8 +556,7 @@ function G(e) {
|
|
|
557
556
|
return t.constructor.createProperty(n, e), r ? Object.getOwnPropertyDescriptor(t, n) : void 0;
|
|
558
557
|
})(e, t, n);
|
|
559
558
|
}
|
|
560
|
-
|
|
561
|
-
//#region ../../node_modules/@lit/reactive-element/decorators/state.js
|
|
559
|
+
// ../../node_modules/@lit/reactive-element/decorators/state.js
|
|
562
560
|
function we(e) {
|
|
563
561
|
return G({
|
|
564
562
|
...e,
|
|
@@ -566,8 +564,7 @@ function we(e) {
|
|
|
566
564
|
attribute: !1
|
|
567
565
|
});
|
|
568
566
|
}
|
|
569
|
-
|
|
570
|
-
//#region ../../node_modules/lit-element/lit-element.js
|
|
567
|
+
// ../../node_modules/lit-element/lit-element.js
|
|
571
568
|
var K = globalThis, q = class extends W {
|
|
572
569
|
constructor() {
|
|
573
570
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
@@ -593,8 +590,7 @@ var K = globalThis, q = class extends W {
|
|
|
593
590
|
q._$litElement$ = !0, q.finalized = !0, K.litElementHydrateSupport?.({ LitElement: q });
|
|
594
591
|
var Te = K.litElementPolyfillSupport;
|
|
595
592
|
Te?.({ LitElement: q }), (K.litElementVersions ??= []).push("4.2.2");
|
|
596
|
-
|
|
597
|
-
//#region ../../shared-strings/nb.ts
|
|
593
|
+
// ../../shared-strings/nb.ts
|
|
598
594
|
var J = {
|
|
599
595
|
generic: {
|
|
600
596
|
from: "Fra",
|
|
@@ -825,8 +821,7 @@ function ke(e) {
|
|
|
825
821
|
t.listeners.delete(e);
|
|
826
822
|
};
|
|
827
823
|
}
|
|
828
|
-
|
|
829
|
-
//#region ../../shared-strings/resolve.ts
|
|
824
|
+
// ../../shared-strings/resolve.ts
|
|
830
825
|
var Ae = /* @__PURE__ */ new Map();
|
|
831
826
|
function je(e, t) {
|
|
832
827
|
if (t) for (let n of Object.keys(t)) {
|
|
@@ -862,8 +857,7 @@ function Pe(e, ...t) {
|
|
|
862
857
|
for (let r of e) n[r] = Z(r, ...t);
|
|
863
858
|
return n;
|
|
864
859
|
}
|
|
865
|
-
|
|
866
|
-
//#region src/controllers/strings-controller.ts
|
|
860
|
+
// src/controllers/strings-controller.ts
|
|
867
861
|
var Fe = class {
|
|
868
862
|
constructor(e) {
|
|
869
863
|
this.host = e, e.addController(this);
|
|
@@ -881,16 +875,14 @@ var Fe = class {
|
|
|
881
875
|
return Pe(e, this.host.strings);
|
|
882
876
|
}
|
|
883
877
|
};
|
|
884
|
-
|
|
885
|
-
//#region \0@oxc-project+runtime@0.154.0/helpers/esm/decorate.js
|
|
878
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/decorate.js
|
|
886
879
|
function Q(e, t, n, r) {
|
|
887
880
|
var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
|
|
888
881
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
|
|
889
882
|
else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
|
|
890
883
|
return i > 3 && a && Object.defineProperty(t, n, a), a;
|
|
891
884
|
}
|
|
892
|
-
|
|
893
|
-
//#region src/base-elements/element.ts
|
|
885
|
+
// src/base-elements/element.ts
|
|
894
886
|
var $ = class extends q {
|
|
895
887
|
constructor(...e) {
|
|
896
888
|
super(...e), this.pktStrings = new Fe(this), this.role = null;
|
|
@@ -905,5 +897,4 @@ var Ie = class extends $ {
|
|
|
905
897
|
return this;
|
|
906
898
|
}
|
|
907
899
|
};
|
|
908
|
-
//#endregion
|
|
909
900
|
export { x as _, Ee as a, q as c, le as d, se as f, S as g, C as h, Oe as i, we as l, oe as m, Q as n, ke as o, ce as p, De as r, J as s, Ie as t, G as u, re as v };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { f as e, g as t, m as n, t as r } from "./element-
|
|
2
|
-
import { t as i } from "./async-directive-
|
|
3
|
-
|
|
1
|
+
import { f as e, g as t, m as n, t as r } from "./element-Bwc-likm.js";
|
|
2
|
+
import { t as i } from "./async-directive-Ct3Mrb1M.js";
|
|
3
|
+
// src/controllers/pkt-slot-utils.ts
|
|
4
4
|
function a(e) {
|
|
5
5
|
return e.classList && (e.classList.contains("_dialog_overlay") || e.classList.contains("backdrop")) ? !0 : typeof e.hasAttribute == "function" && e.hasAttribute("data-skip");
|
|
6
6
|
}
|
|
@@ -10,8 +10,7 @@ function o(e) {
|
|
|
10
10
|
function s(e) {
|
|
11
11
|
return e.nodeType === Node.TEXT_NODE && e.nodeValue?.trim() !== "";
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
//#region src/directives/slot-content.ts
|
|
13
|
+
// src/directives/slot-content.ts
|
|
15
14
|
var c, l = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap(), d = /* @__PURE__ */ new WeakSet();
|
|
16
15
|
function f(e) {
|
|
17
16
|
let t = l.get(e);
|
|
@@ -693,5 +692,4 @@ var P = class extends r {
|
|
|
693
692
|
t.set.call(n, e), f(this).replaceContent(Array.from(n.childNodes)) || t.set.call(this, e);
|
|
694
693
|
}
|
|
695
694
|
};
|
|
696
|
-
//#endregion
|
|
697
695
|
export { o as a, k as i, A as n, f as r, P as t };
|