@oslokommune/punkt-elements 16.7.3 → 16.7.4
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 +18 -0
- package/dist/accordion-BB1JrONI.cjs +34 -0
- package/dist/accordion-nNH87Y60.js +130 -0
- package/dist/alert-BEEnTiCb.cjs +33 -0
- package/dist/alert-ePJuDtmm.js +171 -0
- package/dist/async-directive-B9P1Qa0k.cjs +1 -0
- package/dist/async-directive-CaQiqjyV.js +55 -0
- package/dist/backlink-Ba03LlbB.cjs +13 -0
- package/dist/backlink-CiwXrQYD.js +38 -0
- package/dist/booleanish-BmcOU-43.js +11 -0
- package/dist/booleanish-jJLlnr6-.cjs +1 -0
- package/dist/breadcrumbs-CD1zib3s.cjs +43 -0
- package/dist/breadcrumbs-CpuVqWhF.js +76 -0
- package/dist/button-BIpd1xJh.js +95 -0
- package/dist/button-D-TOBaJB.cjs +27 -0
- package/dist/calendar-BzEtOJla.js +2031 -0
- package/dist/calendar-E5jJLt8D.cjs +90 -0
- package/dist/card-BYJu1MYm.js +339 -0
- package/dist/card-CUFhMVim.cjs +87 -0
- package/dist/checkbox-BARDb9iV.cjs +31 -0
- package/dist/checkbox-Cspxcvt_.js +111 -0
- package/dist/class-map-C8HuhNzZ.js +27 -0
- package/dist/class-map-CJ-msbHs.cjs +1 -0
- package/dist/classutils-DEL164Ur.js +7 -0
- package/dist/classutils-z8YsPlOf.cjs +1 -0
- package/dist/combobox-BcdLZRDU.js +984 -0
- package/dist/combobox-CGbFTWq_.cjs +135 -0
- package/dist/consent-DeB_5sWH.js +197 -0
- package/dist/consent-hwu7pp3S.cjs +11 -0
- package/dist/datepicker-DpmlsnH_.cjs +273 -0
- package/dist/datepicker-OVd8pmnZ.js +1125 -0
- package/dist/dialog-polyfill.esm-1hPr0gl9.js +280 -0
- package/dist/dialog-polyfill.esm-D3Oinvk0.cjs +1 -0
- package/dist/directive-3THFsVew.js +28 -0
- package/dist/directive-CJ2giQBZ.cjs +1 -0
- package/dist/directive-helpers-D1QSxY17.cjs +1 -0
- package/dist/directive-helpers-Dkv2gKgs.js +25 -0
- package/dist/element-DjtxO-1r.cjs +2 -0
- package/dist/element-cZ85T_aa.js +693 -0
- package/dist/element-with-slot-4J2o3SeU.js +166 -0
- package/dist/element-with-slot-CWoTGA1B.cjs +1 -0
- package/dist/header-DWgPgGfS.cjs +304 -0
- package/dist/header-a6ztVNp3.js +782 -0
- package/dist/heading-BgSWIRii.cjs +1 -0
- package/dist/heading-DiQLPxdf.js +73 -0
- package/dist/helptext-CCBKKLus.js +65 -0
- package/dist/helptext-D-3QfZv5.cjs +24 -0
- package/dist/icon-Co72KtgF.js +86 -0
- package/dist/icon-Dr8sfT2X.cjs +1 -0
- package/dist/if-defined-Cjj8qN-Z.js +5 -0
- package/dist/if-defined-XKOD_t_V.cjs +1 -0
- package/dist/index.d.ts +1 -2
- package/dist/input-element-B1yxcfz4.cjs +1 -0
- package/dist/input-element-Bw1s6NlF.js +643 -0
- package/dist/input-wrapper-BRuVELpK.cjs +54 -0
- package/dist/input-wrapper-CDyHTR1V.js +164 -0
- package/dist/input-wrapper-Dwd-_sKm.cjs +1 -0
- package/dist/input-wrapper-YfTmpSSY.js +117 -0
- package/dist/link-CKAFMz9j.js +89 -0
- package/dist/link-CyTCpI0k.cjs +7 -0
- package/dist/linkcard-B0KOGaGj.js +55 -0
- package/dist/linkcard-BE4-FewK.cjs +13 -0
- package/dist/listbox-DCA2JoPV.cjs +106 -0
- package/dist/listbox-DuBgTFvH.js +397 -0
- package/dist/loader-6kFZUErT.js +66 -0
- package/dist/loader-CX2rsC01.cjs +16 -0
- package/dist/messagebox-Cwlg5sOr.js +110 -0
- package/dist/messagebox-Din9X53b.cjs +13 -0
- package/dist/modal-C_wtsh9m.js +209 -0
- package/dist/modal-DS_wUOIv.cjs +36 -0
- package/dist/pkt-accordion.cjs +1 -1
- package/dist/pkt-accordion.js +2 -7
- package/dist/pkt-alert.cjs +1 -1
- package/dist/pkt-alert.js +2 -5
- package/dist/pkt-backlink.cjs +1 -1
- package/dist/pkt-backlink.js +2 -5
- package/dist/pkt-breadcrumbs.cjs +1 -43
- package/dist/pkt-breadcrumbs.js +2 -81
- package/dist/pkt-button.cjs +1 -1
- package/dist/pkt-button.js +2 -5
- package/dist/pkt-calendar.cjs +1 -1
- package/dist/pkt-calendar.js +2 -5
- package/dist/pkt-card.cjs +1 -1
- package/dist/pkt-card.js +2 -5
- package/dist/pkt-checkbox.cjs +1 -1
- package/dist/pkt-checkbox.js +2 -5
- package/dist/pkt-combobox.cjs +1 -1
- package/dist/pkt-combobox.js +2 -5
- package/dist/pkt-consent.cjs +1 -1
- package/dist/pkt-consent.js +2 -5
- package/dist/pkt-datepicker.cjs +1 -1
- package/dist/pkt-datepicker.js +5 -9
- package/dist/pkt-header.cjs +1 -304
- package/dist/pkt-header.js +2 -861
- package/dist/pkt-heading.cjs +1 -1
- package/dist/pkt-heading.js +2 -5
- package/dist/pkt-helptext.cjs +1 -1
- package/dist/pkt-helptext.js +2 -5
- package/dist/pkt-icon.cjs +1 -1
- package/dist/pkt-icon.js +2 -5
- package/dist/pkt-index.cjs +1 -1
- package/dist/pkt-index.js +30 -66
- package/dist/pkt-input-wrapper.cjs +1 -1
- package/dist/pkt-input-wrapper.js +2 -5
- package/dist/pkt-link.cjs +1 -1
- package/dist/pkt-link.js +2 -5
- package/dist/pkt-linkcard.cjs +1 -1
- package/dist/pkt-linkcard.js +2 -5
- package/dist/pkt-listbox.cjs +1 -1
- package/dist/pkt-listbox.js +2 -5
- package/dist/pkt-loader.cjs +1 -1
- package/dist/pkt-loader.js +2 -5
- package/dist/pkt-messagebox.cjs +1 -1
- package/dist/pkt-messagebox.js +2 -5
- package/dist/pkt-modal.cjs +1 -1
- package/dist/pkt-modal.js +2 -5
- package/dist/pkt-options-controller-CRrI6WMk.js +43 -0
- package/dist/pkt-options-controller-CXUGx134.cjs +1 -0
- package/dist/pkt-progressbar.cjs +1 -1
- package/dist/pkt-progressbar.js +2 -5
- package/dist/pkt-radiobutton.cjs +1 -1
- package/dist/pkt-radiobutton.js +2 -5
- package/dist/pkt-select.cjs +1 -1
- package/dist/pkt-select.js +2 -5
- package/dist/pkt-tabs.cjs +1 -1
- package/dist/pkt-tabs.js +2 -7
- package/dist/pkt-tag.cjs +1 -1
- package/dist/pkt-tag.js +2 -5
- package/dist/pkt-textarea.cjs +1 -1
- package/dist/pkt-textarea.js +2 -5
- package/dist/pkt-textinput.cjs +1 -1
- package/dist/pkt-textinput.js +2 -5
- package/dist/pkt-timepicker.cjs +1 -191
- package/dist/pkt-timepicker.js +2 -560
- package/dist/progressbar-CdXtmOBb.cjs +17 -0
- package/dist/progressbar-Dy9AiYQz.js +113 -0
- package/dist/radiobutton-GOnpUbCW.cjs +31 -0
- package/dist/radiobutton-V_KPbup_.js +84 -0
- package/dist/ref-BaJ0mBT_.cjs +1 -0
- package/dist/ref-RS8Uv6uC.js +30 -0
- package/dist/repeat-Cepr3469.js +57 -0
- package/dist/repeat-CqcDYBxr.cjs +1 -0
- package/dist/select-BSAFd8Wa.js +164 -0
- package/dist/select-C2i8sOk5.cjs +49 -0
- package/dist/tabs-D8nL9rWx.cjs +37 -0
- package/dist/tabs-Y7utmJi9.js +318 -0
- package/dist/tag-DLthw5b4.cjs +27 -0
- package/dist/tag-VwykmuQR.js +179 -0
- package/dist/textarea-D7aGOyDf.cjs +46 -0
- package/dist/textarea-DYOBhJrN.js +115 -0
- package/dist/textinput-BUgntXnM.js +124 -0
- package/dist/textinput-DFh8_9cx.cjs +70 -0
- package/dist/timepicker-BIfE7KKJ.cjs +191 -0
- package/dist/timepicker-DaSwn1FA.js +503 -0
- package/dist/utils-CUqCKGvp.js +7 -0
- package/dist/utils-CjAbIttF.cjs +1 -0
- package/package.json +6 -6
- package/src/components/alert/alert.test.ts +1 -1
- package/src/components/alert/alert.ts +6 -6
- package/src/components/datepicker/datepicker-utils.test.ts +16 -23
- package/dist/accordionitem-_9AiCIvd.cjs +0 -34
- package/dist/accordionitem-dCfSrxh5.js +0 -140
- package/dist/alert-BtOk8yRH.cjs +0 -33
- package/dist/alert-DlY2_grU.js +0 -117
- package/dist/async-directive-CMzWMlZ5.js +0 -65
- package/dist/async-directive-DoMuclel.cjs +0 -5
- package/dist/backlink-Ce5Vldop.js +0 -49
- package/dist/backlink-y3dwjKPC.cjs +0 -13
- package/dist/booleanish-BKVonob4.cjs +0 -1
- package/dist/booleanish-C9R0tdXH.js +0 -11
- package/dist/button-B_TXwNzt.cjs +0 -27
- package/dist/button-BiY-wlKF.js +0 -139
- package/dist/calendar-B2pji2zn.cjs +0 -90
- package/dist/calendar-DhjQDC4C.js +0 -2140
- package/dist/card-BwMNB5Bb.cjs +0 -87
- package/dist/card-CGlmcMSR.js +0 -233
- package/dist/checkbox-BsJZYA26.js +0 -147
- package/dist/checkbox-CTY8f_qn.cjs +0 -31
- package/dist/class-map-CEnykyO_.js +0 -34
- package/dist/class-map-CsENJXf1.cjs +0 -5
- package/dist/classutils-BwNK82ZQ.cjs +0 -1
- package/dist/classutils-RQs1k6D9.js +0 -7
- package/dist/combobox-DSB5WOxg.js +0 -815
- package/dist/combobox-DbICIgKG.cjs +0 -135
- package/dist/consent-DkOQpbsg.cjs +0 -11
- package/dist/consent-SNWV_mMU.js +0 -175
- package/dist/datepicker-BEWl9iz3.cjs +0 -273
- package/dist/datepicker-euHyzXnb.js +0 -1170
- package/dist/dialog-polyfill.esm-CPKZe7AL.cjs +0 -1
- package/dist/dialog-polyfill.esm-CbjBMXAG.js +0 -395
- package/dist/directive-C7oCP5Bh.cjs +0 -5
- package/dist/directive-helpers-BP2WOx60.cjs +0 -5
- package/dist/directive-helpers-rm-28gIj.js +0 -38
- package/dist/directive-oAbCiebi.js +0 -27
- package/dist/element-CPpT3rFQ.js +0 -638
- package/dist/element-gR_VtSiD.cjs +0 -27
- package/dist/element-with-slot-Dqk6-TRR.js +0 -240
- package/dist/element-with-slot-ZX-up7jO.cjs +0 -1
- package/dist/heading-D2tVS6lS.js +0 -103
- package/dist/heading-DrzbgDb6.cjs +0 -1
- package/dist/helptext-BKtU4mas.js +0 -82
- package/dist/helptext-DcRC7wW2.cjs +0 -24
- package/dist/icon-CxQcIa5F.js +0 -105
- package/dist/icon-q81vqPK_.cjs +0 -9
- package/dist/if-defined-B0krMLad.js +0 -10
- package/dist/if-defined-BOW3ODSj.cjs +0 -5
- package/dist/input-element-8nLwuQS4.js +0 -837
- package/dist/input-element-DdVhUvva.cjs +0 -1
- package/dist/input-wrapper-Bs4CRNst.js +0 -181
- package/dist/input-wrapper-Bv9aqqVq.cjs +0 -54
- package/dist/input-wrapper-CDgenrYA.js +0 -6
- package/dist/input-wrapper-EoSAbU-U.cjs +0 -1
- package/dist/link-C0rl-86s.cjs +0 -7
- package/dist/link-Cdqgl60z.js +0 -55
- package/dist/linkcard-Dimu7Rlx.cjs +0 -13
- package/dist/linkcard-Lbq_UhjZ.js +0 -56
- package/dist/listbox-Bia4_tvN.js +0 -440
- package/dist/listbox-La2GZQei.cjs +0 -106
- package/dist/loader-D1ugDXGV.cjs +0 -16
- package/dist/loader-DyN6RGC5.js +0 -95
- package/dist/messagebox-BGMVm2t9.js +0 -71
- package/dist/messagebox-M0yIgCz9.cjs +0 -13
- package/dist/modal-CMO1RtIi.cjs +0 -36
- package/dist/modal-DjPQDE-Z.js +0 -156
- package/dist/pkt-options-controller-5LXbEzuk.cjs +0 -1
- package/dist/pkt-options-controller-B5YalfCb.js +0 -39
- package/dist/progressbar-BqlMzkM_.cjs +0 -21
- package/dist/progressbar-sbHDFC12.js +0 -162
- package/dist/radiobutton-5ZqVVtTT.cjs +0 -31
- package/dist/radiobutton-D8Ai8ETa.js +0 -113
- package/dist/ref-Bg_Swj5w.js +0 -42
- package/dist/ref-CL-Xk9Xm.cjs +0 -5
- package/dist/repeat-BD8TKgJb.js +0 -61
- package/dist/repeat-Cfq8CDlf.cjs +0 -5
- package/dist/select-De-n8on9.js +0 -230
- package/dist/select-dTWibR6_.cjs +0 -49
- package/dist/state-C_1EOo3D.js +0 -12
- package/dist/state-Dg-53wQ8.cjs +0 -5
- package/dist/tabitem-B9-jeV97.js +0 -334
- package/dist/tabitem-BnhzqfW3.cjs +0 -65
- package/dist/tag-CbwO8yvD.cjs +0 -27
- package/dist/tag-D4FI5t3y.js +0 -117
- package/dist/textarea-BmLaKzsc.cjs +0 -50
- package/dist/textarea-CMiSJaYL.js +0 -133
- package/dist/textinput-em9y4yrL.cjs +0 -70
- package/dist/textinput-r8udK0IX.js +0 -152
- package/dist/utils-DznhwRXm.js +0 -8
- package/dist/utils-byXsEz1u.cjs +0 -1
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
const e=require(`./element-DjtxO-1r.cjs`),t=require(`./class-map-CJ-msbHs.cjs`),n=require(`./element-with-slot-CWoTGA1B.cjs`);require(`./alert-BEEnTiCb.cjs`);const r=require(`./icon-Dr8sfT2X.cjs`),i=require(`./if-defined-XKOD_t_V.cjs`),a=require(`./utils-CjAbIttF.cjs`),o=require(`./booleanish-jJLlnr6-.cjs`),s=require(`./input-wrapper-Dwd-_sKm.cjs`);require(`./helptext-D-3QfZv5.cjs`);var c=class extends n.t{constructor(...e){super(...e),this.forId=a.n(),this.label=``,this.helptext=null,this.helptextDropdown=null,this.helptextDropdownButton=null,this.counter=s.t.props.counter.default,this.counterCurrent=0,this.counterMaxLength=0,this.counterError=null,this.counterPosition=`bottom`,this.optionalTag=s.t.props.optionalTag.default,this.optionalText=s.t.props.optionalText.default,this.requiredTag=s.t.props.requiredTag.default,this.requiredText=s.t.props.requiredText.default,this.tagText=null,this.hasError=s.t.props.hasError.default,this.errorMessage=``,this.disabled=s.t.props.disabled.default,this.inline=s.t.props.inline.default,this.ariaDescribedby=void 0,this.hasFieldset=s.t.props.hasFieldset.default,this.role=`group`,this.useWrapper=s.t.props.useWrapper.default}updated(e){super.updated(e)}render(){let a={"pkt-inputwrapper":!0,"pkt-inputwrapper--error":this.hasError,"pkt-inputwrapper--disabled":this.disabled,"pkt-inputwrapper--inline":this.inline},o=`pkt-tag pkt-tag--small pkt-tag--thin-text`,c=this.ariaDescribedby?this.ariaDescribedby:this.helptext?`${this.forId}-helptext`:e.l,l=()=>e.d`
|
|
2
|
+
${this.tagText?e.d`<span class=${o+` pkt-tag--gray`}>${this.tagText}</span>`:e.l}
|
|
3
|
+
${this.optionalTag?e.d`<span class=${o+` pkt-tag--blue-light`}>${this.optionalText}</span>`:e.l}
|
|
4
|
+
${this.requiredTag?e.d`<span class=${o+` pkt-tag--beige`}>${this.requiredText}</span>`:e.l}
|
|
5
|
+
`,u=()=>this.useWrapper?this.hasFieldset?e.d`<legend
|
|
6
|
+
class="pkt-inputwrapper__legend"
|
|
7
|
+
id="${this.forId}-label"
|
|
8
|
+
@click=${this.handleLabelClick}
|
|
9
|
+
>
|
|
10
|
+
${this.label} ${l()}
|
|
11
|
+
</legend>`:e.d`<label
|
|
12
|
+
class="pkt-inputwrapper__label"
|
|
13
|
+
for="${this.forId}"
|
|
14
|
+
aria-describedby="${c}"
|
|
15
|
+
id="${this.forId}-label"
|
|
16
|
+
@click=${this.handleLabelClick}
|
|
17
|
+
>${this.label}${l()}</label
|
|
18
|
+
>`:e.d`<label
|
|
19
|
+
for="${this.forId}"
|
|
20
|
+
class="pkt-sr-only"
|
|
21
|
+
aria-describedby="${c}"
|
|
22
|
+
id="${this.forId}-label"
|
|
23
|
+
>
|
|
24
|
+
${this.label}
|
|
25
|
+
</label>`,d=()=>e.d`
|
|
26
|
+
<pkt-helptext
|
|
27
|
+
class="${i.t(this.useWrapper?void 0:`pkt-hide`)}"
|
|
28
|
+
.forId=${this.forId}
|
|
29
|
+
.helptext=${this.helptext}
|
|
30
|
+
.helptextDropdown=${this.helptextDropdown}
|
|
31
|
+
.helptextDropdownButton=${this.helptextDropdownButton||s.t.props.helptextDropdownButton.default}
|
|
32
|
+
@toggleHelpText=${e=>{this.toggleDropdown(e)}}
|
|
33
|
+
>${n.n(this,`helptext`)}</pkt-helptext>
|
|
34
|
+
`,f=()=>this.counter?e.d`<div class="pkt-input__counter" aria-live="polite" aria-atomic="true">
|
|
35
|
+
${this.counterError?this.counterError:e.l} ${this.counterCurrent||0}
|
|
36
|
+
${this.counterMaxLength?`/${this.counterMaxLength}`:e.l}
|
|
37
|
+
</div>`:e.l,p=()=>this.hasError&&this.errorMessage?e.d`<pkt-alert
|
|
38
|
+
skin="error"
|
|
39
|
+
compact
|
|
40
|
+
id=${`${this.forId}-error`}
|
|
41
|
+
aria-live="assertive"
|
|
42
|
+
aria-atomic="true"
|
|
43
|
+
>
|
|
44
|
+
${r.r(this.errorMessage)}
|
|
45
|
+
</pkt-alert>`:e.l,m=()=>e.d`
|
|
46
|
+
${u()}
|
|
47
|
+
${d()}
|
|
48
|
+
${this.counterPosition===`top`?f():e.l}
|
|
49
|
+
<div class="pkt-contents">${n.n(this)}</div>
|
|
50
|
+
${this.counterPosition===`bottom`?f():e.l}
|
|
51
|
+
${p()}
|
|
52
|
+
`;return e.d`<div class=${t.t(a)}>${this.hasFieldset?e.d`<fieldset class="pkt-inputwrapper__fieldset" aria-describedby="${c}">
|
|
53
|
+
${m()}
|
|
54
|
+
</fieldset>`:e.d`<div class="pkt-inputwrapper__fieldset">${m()}</div>`}</div> `}toggleDropdown(e){this.dispatchEvent(new CustomEvent(`toggleHelpText`,{bubbles:!1,detail:{isOpen:e.detail.isOpen}}))}handleLabelClick(){this.dispatchEvent(new CustomEvent(`labelClick`,{bubbles:!0,composed:!0,detail:`label clicked`}))}};e.r([e.s({type:String})],c.prototype,`forId`,void 0),e.r([e.s({type:String})],c.prototype,`label`,void 0),e.r([e.s({type:String})],c.prototype,`helptext`,void 0),e.r([e.s({type:String})],c.prototype,`helptextDropdown`,void 0),e.r([e.s({type:String})],c.prototype,`helptextDropdownButton`,void 0),e.r([e.s({type:Boolean})],c.prototype,`counter`,void 0),e.r([e.s({type:Number})],c.prototype,`counterCurrent`,void 0),e.r([e.s({type:Number})],c.prototype,`counterMaxLength`,void 0),e.r([e.s({type:String})],c.prototype,`counterError`,void 0),e.r([e.s({type:String,reflect:!1})],c.prototype,`counterPosition`,void 0),e.r([e.s({type:Boolean})],c.prototype,`optionalTag`,void 0),e.r([e.s({type:String})],c.prototype,`optionalText`,void 0),e.r([e.s({type:Boolean})],c.prototype,`requiredTag`,void 0),e.r([e.s({type:String})],c.prototype,`requiredText`,void 0),e.r([e.s({type:String})],c.prototype,`tagText`,void 0),e.r([e.s({type:Boolean})],c.prototype,`hasError`,void 0),e.r([e.s({type:String})],c.prototype,`errorMessage`,void 0),e.r([e.s({type:Boolean})],c.prototype,`disabled`,void 0),e.r([e.s({type:Boolean})],c.prototype,`inline`,void 0),e.r([e.s({type:String})],c.prototype,`ariaDescribedby`,void 0),e.r([e.s({type:Boolean})],c.prototype,`hasFieldset`,void 0),e.r([e.s({type:String,reflect:!0})],c.prototype,`role`,void 0),e.r([e.s({type:Boolean,reflect:!0,converter:o.t})],c.prototype,`useWrapper`,void 0);try{e.c(`pkt-input-wrapper`)(c)}catch{console.warn(`Forsøker å definere <pkt-input-wrapper>, men den er allerede definert`)}var l=c;Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return l}});
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
var e = {
|
|
2
|
+
name: "pkt-input-wrapper",
|
|
3
|
+
react: "PktInputWrapper",
|
|
4
|
+
"css-class": "pkt-inputwrapper",
|
|
5
|
+
isElement: !0,
|
|
6
|
+
isPureReact: !0,
|
|
7
|
+
events: { toggleHelpText: { description: "Event for å vise eller skjule hjelpetekst i dropdown" } },
|
|
8
|
+
slots: { default: { description: "Innholdet i input-wrapperen, som kan være et skjemaelement eller en annen komponent" } },
|
|
9
|
+
props: {
|
|
10
|
+
forId: {
|
|
11
|
+
name: "For ID",
|
|
12
|
+
description: "Id-en til skjemaelementet som dette wrapper rundt",
|
|
13
|
+
type: "string",
|
|
14
|
+
required: !0,
|
|
15
|
+
category: "tech"
|
|
16
|
+
},
|
|
17
|
+
label: {
|
|
18
|
+
name: "Merkelapp",
|
|
19
|
+
description: "Merkelapp for skjemaelementet",
|
|
20
|
+
type: "string",
|
|
21
|
+
required: !0,
|
|
22
|
+
category: "contents"
|
|
23
|
+
},
|
|
24
|
+
helptext: {
|
|
25
|
+
name: "Hjelpetekst",
|
|
26
|
+
description: "Hjelpetekst for skjemaelementet",
|
|
27
|
+
type: "string",
|
|
28
|
+
category: "contents"
|
|
29
|
+
},
|
|
30
|
+
helptextDropdown: {
|
|
31
|
+
name: "Hjelpetekst i dropdown",
|
|
32
|
+
description: "Hjelpetekst som vises i ekspanderende felt",
|
|
33
|
+
type: "string",
|
|
34
|
+
category: "contents"
|
|
35
|
+
},
|
|
36
|
+
helptextDropdownButton: {
|
|
37
|
+
name: "Tekst i hjelpetekst-knapp",
|
|
38
|
+
description: "Tekst som vises i knappen for å vise hjelpetekst i dropdown",
|
|
39
|
+
default: "Les mer <span class='pkt-sr-only'>om feltet</span>",
|
|
40
|
+
type: "string",
|
|
41
|
+
category: "contents"
|
|
42
|
+
},
|
|
43
|
+
ariaDescribedby: {
|
|
44
|
+
name: "aria-describedby",
|
|
45
|
+
description: "Id-en til elementet som beskriver skjemaelementet",
|
|
46
|
+
type: "string",
|
|
47
|
+
category: "accessibility"
|
|
48
|
+
},
|
|
49
|
+
counter: {
|
|
50
|
+
name: "Teller",
|
|
51
|
+
description: "Teller for antall tegn i skjemaelementet",
|
|
52
|
+
type: "boolean",
|
|
53
|
+
default: !1,
|
|
54
|
+
category: "ui"
|
|
55
|
+
},
|
|
56
|
+
counterCurrent: {
|
|
57
|
+
name: "Tellerverdi",
|
|
58
|
+
description: "Tellerens nåværende verdi",
|
|
59
|
+
type: "number",
|
|
60
|
+
category: "ui",
|
|
61
|
+
showIf: { counter: !0 }
|
|
62
|
+
},
|
|
63
|
+
counterMaxLength: {
|
|
64
|
+
name: "Maks tegn i teller",
|
|
65
|
+
description: "Maks antall tegn som kan skrives i skjemaelementet",
|
|
66
|
+
type: "number",
|
|
67
|
+
category: "ui",
|
|
68
|
+
showIf: { counter: !0 }
|
|
69
|
+
},
|
|
70
|
+
counterPosition: {
|
|
71
|
+
name: "Tellerplassering",
|
|
72
|
+
description: "Telleren sin plassering i forhold til elementet",
|
|
73
|
+
type: ["top", "bottom"],
|
|
74
|
+
default: "bottom",
|
|
75
|
+
category: "ui",
|
|
76
|
+
showIf: { counter: !0 }
|
|
77
|
+
},
|
|
78
|
+
optionalTag: {
|
|
79
|
+
name: "Vise valgfritt-merking",
|
|
80
|
+
description: "Viser en merking som indikerer at feltet er valgfritt",
|
|
81
|
+
type: "boolean",
|
|
82
|
+
default: !1,
|
|
83
|
+
category: "ui"
|
|
84
|
+
},
|
|
85
|
+
optionalText: {
|
|
86
|
+
name: "Valgfritt-tekst",
|
|
87
|
+
description: "Tekst som vises i valgfritt-merkingen",
|
|
88
|
+
type: "string",
|
|
89
|
+
default: "Valgfritt",
|
|
90
|
+
category: "contents"
|
|
91
|
+
},
|
|
92
|
+
requiredTag: {
|
|
93
|
+
name: "Vise påkrevd-merking",
|
|
94
|
+
description: "Viser en merking som indikerer at feltet er påkrevd",
|
|
95
|
+
type: "boolean",
|
|
96
|
+
default: !1,
|
|
97
|
+
category: "ui"
|
|
98
|
+
},
|
|
99
|
+
requiredText: {
|
|
100
|
+
name: "Påkrevd-tekst",
|
|
101
|
+
description: "Tekst som vises i påkrevd-merkingen",
|
|
102
|
+
type: "string",
|
|
103
|
+
default: "Må fylles ut",
|
|
104
|
+
category: "contents"
|
|
105
|
+
},
|
|
106
|
+
tagText: {
|
|
107
|
+
type: "string",
|
|
108
|
+
name: "Tag-tekst",
|
|
109
|
+
description: "Tekst som vises i en tag ved siden av label",
|
|
110
|
+
category: "ui"
|
|
111
|
+
},
|
|
112
|
+
hasError: {
|
|
113
|
+
name: "Feil",
|
|
114
|
+
description: "Indikerer at skjemaelementet har en feil",
|
|
115
|
+
type: "boolean",
|
|
116
|
+
default: !1,
|
|
117
|
+
category: "ui"
|
|
118
|
+
},
|
|
119
|
+
errorMessage: {
|
|
120
|
+
name: "Feilmelding",
|
|
121
|
+
description: "Feilmelding som vises når skjemaelementet har en feil",
|
|
122
|
+
type: "string",
|
|
123
|
+
category: "contents"
|
|
124
|
+
},
|
|
125
|
+
disabled: {
|
|
126
|
+
name: "Deaktivert",
|
|
127
|
+
description: "Indikerer at skjemaelementet er deaktivert",
|
|
128
|
+
type: "boolean",
|
|
129
|
+
default: !1,
|
|
130
|
+
category: "tech"
|
|
131
|
+
},
|
|
132
|
+
inline: {
|
|
133
|
+
name: "Inline",
|
|
134
|
+
description: "Indikerer at skjemaelementet skal flyte sammen med sidens innhold",
|
|
135
|
+
type: "boolean",
|
|
136
|
+
default: !1,
|
|
137
|
+
category: "ui"
|
|
138
|
+
},
|
|
139
|
+
hasFieldset: {
|
|
140
|
+
name: "Er fieldset",
|
|
141
|
+
description: "Indikerer at innholdet er et fieldset",
|
|
142
|
+
type: "boolean",
|
|
143
|
+
default: !1,
|
|
144
|
+
category: "ui"
|
|
145
|
+
},
|
|
146
|
+
useWrapper: {
|
|
147
|
+
name: "Bruk wrapper",
|
|
148
|
+
description: "Indikerer om skjemaelementet skal bruke en wrapper",
|
|
149
|
+
type: "boolean",
|
|
150
|
+
displayAsFalse: !0,
|
|
151
|
+
default: !0,
|
|
152
|
+
category: "ui"
|
|
153
|
+
},
|
|
154
|
+
role: {
|
|
155
|
+
name: "Rolle",
|
|
156
|
+
description: "Rollen til elementet",
|
|
157
|
+
type: "string",
|
|
158
|
+
default: "group",
|
|
159
|
+
category: "accessibility"
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
//#endregion
|
|
164
|
+
export { e as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={name:`pkt-input-wrapper`,react:`PktInputWrapper`,"css-class":`pkt-inputwrapper`,isElement:!0,isPureReact:!0,events:{toggleHelpText:{description:`Event for å vise eller skjule hjelpetekst i dropdown`}},slots:{default:{description:`Innholdet i input-wrapperen, som kan være et skjemaelement eller en annen komponent`}},props:{forId:{name:`For ID`,description:`Id-en til skjemaelementet som dette wrapper rundt`,type:`string`,required:!0,category:`tech`},label:{name:`Merkelapp`,description:`Merkelapp for skjemaelementet`,type:`string`,required:!0,category:`contents`},helptext:{name:`Hjelpetekst`,description:`Hjelpetekst for skjemaelementet`,type:`string`,category:`contents`},helptextDropdown:{name:`Hjelpetekst i dropdown`,description:`Hjelpetekst som vises i ekspanderende felt`,type:`string`,category:`contents`},helptextDropdownButton:{name:`Tekst i hjelpetekst-knapp`,description:`Tekst som vises i knappen for å vise hjelpetekst i dropdown`,default:`Les mer <span class='pkt-sr-only'>om feltet</span>`,type:`string`,category:`contents`},ariaDescribedby:{name:`aria-describedby`,description:`Id-en til elementet som beskriver skjemaelementet`,type:`string`,category:`accessibility`},counter:{name:`Teller`,description:`Teller for antall tegn i skjemaelementet`,type:`boolean`,default:!1,category:`ui`},counterCurrent:{name:`Tellerverdi`,description:`Tellerens nåværende verdi`,type:`number`,category:`ui`,showIf:{counter:!0}},counterMaxLength:{name:`Maks tegn i teller`,description:`Maks antall tegn som kan skrives i skjemaelementet`,type:`number`,category:`ui`,showIf:{counter:!0}},counterPosition:{name:`Tellerplassering`,description:`Telleren sin plassering i forhold til elementet`,type:[`top`,`bottom`],default:`bottom`,category:`ui`,showIf:{counter:!0}},optionalTag:{name:`Vise valgfritt-merking`,description:`Viser en merking som indikerer at feltet er valgfritt`,type:`boolean`,default:!1,category:`ui`},optionalText:{name:`Valgfritt-tekst`,description:`Tekst som vises i valgfritt-merkingen`,type:`string`,default:`Valgfritt`,category:`contents`},requiredTag:{name:`Vise påkrevd-merking`,description:`Viser en merking som indikerer at feltet er påkrevd`,type:`boolean`,default:!1,category:`ui`},requiredText:{name:`Påkrevd-tekst`,description:`Tekst som vises i påkrevd-merkingen`,type:`string`,default:`Må fylles ut`,category:`contents`},tagText:{type:`string`,name:`Tag-tekst`,description:`Tekst som vises i en tag ved siden av label`,category:`ui`},hasError:{name:`Feil`,description:`Indikerer at skjemaelementet har en feil`,type:`boolean`,default:!1,category:`ui`},errorMessage:{name:`Feilmelding`,description:`Feilmelding som vises når skjemaelementet har en feil`,type:`string`,category:`contents`},disabled:{name:`Deaktivert`,description:`Indikerer at skjemaelementet er deaktivert`,type:`boolean`,default:!1,category:`tech`},inline:{name:`Inline`,description:`Indikerer at skjemaelementet skal flyte sammen med sidens innhold`,type:`boolean`,default:!1,category:`ui`},hasFieldset:{name:`Er fieldset`,description:`Indikerer at innholdet er et fieldset`,type:`boolean`,default:!1,category:`ui`},useWrapper:{name:`Bruk wrapper`,description:`Indikerer om skjemaelementet skal bruke en wrapper`,type:`boolean`,displayAsFalse:!0,default:!0,category:`ui`},role:{name:`Rolle`,description:`Rollen til elementet`,type:`string`,default:`group`,category:`accessibility`}}};Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { c as e, d as t, l as n, r, s as i } from "./element-cZ85T_aa.js";
|
|
2
|
+
import { t as a } from "./class-map-C8HuhNzZ.js";
|
|
3
|
+
import { n as o, t as s } from "./element-with-slot-4J2o3SeU.js";
|
|
4
|
+
import "./alert-ePJuDtmm.js";
|
|
5
|
+
import { r as c } from "./icon-Co72KtgF.js";
|
|
6
|
+
import { t as l } from "./if-defined-Cjj8qN-Z.js";
|
|
7
|
+
import { n as u } from "./utils-CUqCKGvp.js";
|
|
8
|
+
import { t as d } from "./booleanish-BmcOU-43.js";
|
|
9
|
+
import { t as f } from "./input-wrapper-CDyHTR1V.js";
|
|
10
|
+
import "./helptext-CCBKKLus.js";
|
|
11
|
+
//#region src/components/input-wrapper/input-wrapper.ts
|
|
12
|
+
var p = class extends s {
|
|
13
|
+
constructor(...e) {
|
|
14
|
+
super(...e), this.forId = u(), this.label = "", this.helptext = null, this.helptextDropdown = null, this.helptextDropdownButton = null, this.counter = f.props.counter.default, this.counterCurrent = 0, this.counterMaxLength = 0, this.counterError = null, this.counterPosition = "bottom", this.optionalTag = f.props.optionalTag.default, this.optionalText = f.props.optionalText.default, this.requiredTag = f.props.requiredTag.default, this.requiredText = f.props.requiredText.default, this.tagText = null, this.hasError = f.props.hasError.default, this.errorMessage = "", this.disabled = f.props.disabled.default, this.inline = f.props.inline.default, this.ariaDescribedby = void 0, this.hasFieldset = f.props.hasFieldset.default, this.role = "group", this.useWrapper = f.props.useWrapper.default;
|
|
15
|
+
}
|
|
16
|
+
updated(e) {
|
|
17
|
+
super.updated(e);
|
|
18
|
+
}
|
|
19
|
+
render() {
|
|
20
|
+
let e = {
|
|
21
|
+
"pkt-inputwrapper": !0,
|
|
22
|
+
"pkt-inputwrapper--error": this.hasError,
|
|
23
|
+
"pkt-inputwrapper--disabled": this.disabled,
|
|
24
|
+
"pkt-inputwrapper--inline": this.inline
|
|
25
|
+
}, r = "pkt-tag pkt-tag--small pkt-tag--thin-text", i = this.ariaDescribedby ? this.ariaDescribedby : this.helptext ? `${this.forId}-helptext` : n, s = () => t`
|
|
26
|
+
${this.tagText ? t`<span class=${r + " pkt-tag--gray"}>${this.tagText}</span>` : n}
|
|
27
|
+
${this.optionalTag ? t`<span class=${r + " pkt-tag--blue-light"}>${this.optionalText}</span>` : n}
|
|
28
|
+
${this.requiredTag ? t`<span class=${r + " pkt-tag--beige"}>${this.requiredText}</span>` : n}
|
|
29
|
+
`, u = () => this.useWrapper ? this.hasFieldset ? t`<legend
|
|
30
|
+
class="pkt-inputwrapper__legend"
|
|
31
|
+
id="${this.forId}-label"
|
|
32
|
+
@click=${this.handleLabelClick}
|
|
33
|
+
>
|
|
34
|
+
${this.label} ${s()}
|
|
35
|
+
</legend>` : t`<label
|
|
36
|
+
class="pkt-inputwrapper__label"
|
|
37
|
+
for="${this.forId}"
|
|
38
|
+
aria-describedby="${i}"
|
|
39
|
+
id="${this.forId}-label"
|
|
40
|
+
@click=${this.handleLabelClick}
|
|
41
|
+
>${this.label}${s()}</label
|
|
42
|
+
>` : t`<label
|
|
43
|
+
for="${this.forId}"
|
|
44
|
+
class="pkt-sr-only"
|
|
45
|
+
aria-describedby="${i}"
|
|
46
|
+
id="${this.forId}-label"
|
|
47
|
+
>
|
|
48
|
+
${this.label}
|
|
49
|
+
</label>`, d = () => t`
|
|
50
|
+
<pkt-helptext
|
|
51
|
+
class="${l(this.useWrapper ? void 0 : "pkt-hide")}"
|
|
52
|
+
.forId=${this.forId}
|
|
53
|
+
.helptext=${this.helptext}
|
|
54
|
+
.helptextDropdown=${this.helptextDropdown}
|
|
55
|
+
.helptextDropdownButton=${this.helptextDropdownButton || f.props.helptextDropdownButton.default}
|
|
56
|
+
@toggleHelpText=${(e) => {
|
|
57
|
+
this.toggleDropdown(e);
|
|
58
|
+
}}
|
|
59
|
+
>${o(this, "helptext")}</pkt-helptext>
|
|
60
|
+
`, p = () => this.counter ? t`<div class="pkt-input__counter" aria-live="polite" aria-atomic="true">
|
|
61
|
+
${this.counterError ? this.counterError : n} ${this.counterCurrent || 0}
|
|
62
|
+
${this.counterMaxLength ? `/${this.counterMaxLength}` : n}
|
|
63
|
+
</div>` : n, m = () => this.hasError && this.errorMessage ? t`<pkt-alert
|
|
64
|
+
skin="error"
|
|
65
|
+
compact
|
|
66
|
+
id=${`${this.forId}-error`}
|
|
67
|
+
aria-live="assertive"
|
|
68
|
+
aria-atomic="true"
|
|
69
|
+
>
|
|
70
|
+
${c(this.errorMessage)}
|
|
71
|
+
</pkt-alert>` : n, h = () => t`
|
|
72
|
+
${u()}
|
|
73
|
+
${d()}
|
|
74
|
+
${this.counterPosition === "top" ? p() : n}
|
|
75
|
+
<div class="pkt-contents">${o(this)}</div>
|
|
76
|
+
${this.counterPosition === "bottom" ? p() : n}
|
|
77
|
+
${m()}
|
|
78
|
+
`;
|
|
79
|
+
return t`<div class=${a(e)}>${this.hasFieldset ? t`<fieldset class="pkt-inputwrapper__fieldset" aria-describedby="${i}">
|
|
80
|
+
${h()}
|
|
81
|
+
</fieldset>` : t`<div class="pkt-inputwrapper__fieldset">${h()}</div>`}</div> `;
|
|
82
|
+
}
|
|
83
|
+
toggleDropdown(e) {
|
|
84
|
+
this.dispatchEvent(new CustomEvent("toggleHelpText", {
|
|
85
|
+
bubbles: !1,
|
|
86
|
+
detail: { isOpen: e.detail.isOpen }
|
|
87
|
+
}));
|
|
88
|
+
}
|
|
89
|
+
handleLabelClick() {
|
|
90
|
+
this.dispatchEvent(new CustomEvent("labelClick", {
|
|
91
|
+
bubbles: !0,
|
|
92
|
+
composed: !0,
|
|
93
|
+
detail: "label clicked"
|
|
94
|
+
}));
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
r([i({ type: String })], p.prototype, "forId", void 0), r([i({ type: String })], p.prototype, "label", void 0), r([i({ type: String })], p.prototype, "helptext", void 0), r([i({ type: String })], p.prototype, "helptextDropdown", void 0), r([i({ type: String })], p.prototype, "helptextDropdownButton", void 0), r([i({ type: Boolean })], p.prototype, "counter", void 0), r([i({ type: Number })], p.prototype, "counterCurrent", void 0), r([i({ type: Number })], p.prototype, "counterMaxLength", void 0), r([i({ type: String })], p.prototype, "counterError", void 0), r([i({
|
|
98
|
+
type: String,
|
|
99
|
+
reflect: !1
|
|
100
|
+
})], p.prototype, "counterPosition", void 0), r([i({ type: Boolean })], p.prototype, "optionalTag", void 0), r([i({ type: String })], p.prototype, "optionalText", void 0), r([i({ type: Boolean })], p.prototype, "requiredTag", void 0), r([i({ type: String })], p.prototype, "requiredText", void 0), r([i({ type: String })], p.prototype, "tagText", void 0), r([i({ type: Boolean })], p.prototype, "hasError", void 0), r([i({ type: String })], p.prototype, "errorMessage", void 0), r([i({ type: Boolean })], p.prototype, "disabled", void 0), r([i({ type: Boolean })], p.prototype, "inline", void 0), r([i({ type: String })], p.prototype, "ariaDescribedby", void 0), r([i({ type: Boolean })], p.prototype, "hasFieldset", void 0), r([i({
|
|
101
|
+
type: String,
|
|
102
|
+
reflect: !0
|
|
103
|
+
})], p.prototype, "role", void 0), r([i({
|
|
104
|
+
type: Boolean,
|
|
105
|
+
reflect: !0,
|
|
106
|
+
converter: d
|
|
107
|
+
})], p.prototype, "useWrapper", void 0);
|
|
108
|
+
try {
|
|
109
|
+
e("pkt-input-wrapper")(p);
|
|
110
|
+
} catch {
|
|
111
|
+
console.warn("Forsøker å definere <pkt-input-wrapper>, men den er allerede definert");
|
|
112
|
+
}
|
|
113
|
+
//#endregion
|
|
114
|
+
//#region src/components/input-wrapper/index.ts
|
|
115
|
+
var m = p;
|
|
116
|
+
//#endregion
|
|
117
|
+
export { p as n, m as t };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { c as e, d as t, l as n, r, s as i } from "./element-cZ85T_aa.js";
|
|
2
|
+
import { t as a } from "./class-map-C8HuhNzZ.js";
|
|
3
|
+
import { n as o, t as s } from "./element-with-slot-4J2o3SeU.js";
|
|
4
|
+
import "./icon-Co72KtgF.js";
|
|
5
|
+
var c = {
|
|
6
|
+
name: "pkt-link",
|
|
7
|
+
react: "PktLink",
|
|
8
|
+
"css-class": "pkt-link",
|
|
9
|
+
"dark-mode": !0,
|
|
10
|
+
isElement: !0,
|
|
11
|
+
props: {
|
|
12
|
+
href: {
|
|
13
|
+
name: "URL",
|
|
14
|
+
description: "URL til lenken",
|
|
15
|
+
type: "string",
|
|
16
|
+
default: "#",
|
|
17
|
+
category: "contents"
|
|
18
|
+
},
|
|
19
|
+
target: {
|
|
20
|
+
name: "Mål",
|
|
21
|
+
description: "Mål for lenken",
|
|
22
|
+
type: [
|
|
23
|
+
"_blank",
|
|
24
|
+
"_self",
|
|
25
|
+
"_parent",
|
|
26
|
+
"_top"
|
|
27
|
+
],
|
|
28
|
+
default: "_self",
|
|
29
|
+
category: "tech"
|
|
30
|
+
},
|
|
31
|
+
iconName: {
|
|
32
|
+
name: "Ikon",
|
|
33
|
+
description: "Ikon som skal vises ved siden av lenketeksten",
|
|
34
|
+
type: "icon",
|
|
35
|
+
category: "ui"
|
|
36
|
+
},
|
|
37
|
+
iconPosition: {
|
|
38
|
+
name: "Ikonposisjon",
|
|
39
|
+
description: "Posisjonen til ikonet i forhold til lenketeksten",
|
|
40
|
+
type: ["left", "right"],
|
|
41
|
+
category: "ui"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
slots: { default: { description: "Innholdet i lenken" } }
|
|
45
|
+
}, l = class extends s {
|
|
46
|
+
constructor(...e) {
|
|
47
|
+
super(...e), this.href = c.props.href.default, this.iconName = void 0, this.iconPosition = void 0, this.external = !1, this.target = c.props.target.default;
|
|
48
|
+
}
|
|
49
|
+
render() {
|
|
50
|
+
return t`<a
|
|
51
|
+
class=${a({
|
|
52
|
+
"pkt-link": !0,
|
|
53
|
+
"pkt-link--icon-left": !!this.iconName && this.iconPosition === "left" || !!(this.iconName && !this.iconPosition),
|
|
54
|
+
"pkt-link--icon-right": !!this.iconName && this.iconPosition === "right",
|
|
55
|
+
"pkt-link--external": this.external
|
|
56
|
+
})}
|
|
57
|
+
href=${this.href}
|
|
58
|
+
.target=${this.target}
|
|
59
|
+
.rel=${this.external ? "noopener noreferrer" : n}
|
|
60
|
+
>${this.iconName ? t`<pkt-icon name=${this.iconName} class="pkt-link__icon"></pkt-icon>` : ""} <span>${o(this)}</span></a
|
|
61
|
+
>`;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
r([i({
|
|
65
|
+
type: String,
|
|
66
|
+
reflect: !0
|
|
67
|
+
})], l.prototype, "href", void 0), r([i({
|
|
68
|
+
type: String,
|
|
69
|
+
reflect: !0
|
|
70
|
+
})], l.prototype, "iconName", void 0), r([i({
|
|
71
|
+
type: String,
|
|
72
|
+
reflect: !0
|
|
73
|
+
})], l.prototype, "iconPosition", void 0), r([i({
|
|
74
|
+
type: Boolean,
|
|
75
|
+
reflect: !0
|
|
76
|
+
})], l.prototype, "external", void 0), r([i({
|
|
77
|
+
type: String,
|
|
78
|
+
reflect: !0
|
|
79
|
+
})], l.prototype, "target", void 0);
|
|
80
|
+
try {
|
|
81
|
+
e("pkt-link")(l);
|
|
82
|
+
} catch {
|
|
83
|
+
console.warn("Forsøker å definere <pkt-link>, men den er allerede definert");
|
|
84
|
+
}
|
|
85
|
+
//#endregion
|
|
86
|
+
//#region src/components/link/index.ts
|
|
87
|
+
var u = l;
|
|
88
|
+
//#endregion
|
|
89
|
+
export { l as n, u as t };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
const e=require(`./element-DjtxO-1r.cjs`),t=require(`./class-map-CJ-msbHs.cjs`),n=require(`./element-with-slot-CWoTGA1B.cjs`);require(`./icon-Dr8sfT2X.cjs`);var r={name:`pkt-link`,react:`PktLink`,"css-class":`pkt-link`,"dark-mode":!0,isElement:!0,props:{href:{name:`URL`,description:`URL til lenken`,type:`string`,default:`#`,category:`contents`},target:{name:`Mål`,description:`Mål for lenken`,type:[`_blank`,`_self`,`_parent`,`_top`],default:`_self`,category:`tech`},iconName:{name:`Ikon`,description:`Ikon som skal vises ved siden av lenketeksten`,type:`icon`,category:`ui`},iconPosition:{name:`Ikonposisjon`,description:`Posisjonen til ikonet i forhold til lenketeksten`,type:[`left`,`right`],category:`ui`}},slots:{default:{description:`Innholdet i lenken`}}},i=class extends n.t{constructor(...e){super(...e),this.href=r.props.href.default,this.iconName=void 0,this.iconPosition=void 0,this.external=!1,this.target=r.props.target.default}render(){return e.d`<a
|
|
2
|
+
class=${t.t({"pkt-link":!0,"pkt-link--icon-left":!!this.iconName&&this.iconPosition===`left`||!!(this.iconName&&!this.iconPosition),"pkt-link--icon-right":!!this.iconName&&this.iconPosition===`right`,"pkt-link--external":this.external})}
|
|
3
|
+
href=${this.href}
|
|
4
|
+
.target=${this.target}
|
|
5
|
+
.rel=${this.external?`noopener noreferrer`:e.l}
|
|
6
|
+
>${this.iconName?e.d`<pkt-icon name=${this.iconName} class="pkt-link__icon"></pkt-icon>`:``} <span>${n.n(this)}</span></a
|
|
7
|
+
>`}};e.r([e.s({type:String,reflect:!0})],i.prototype,`href`,void 0),e.r([e.s({type:String,reflect:!0})],i.prototype,`iconName`,void 0),e.r([e.s({type:String,reflect:!0})],i.prototype,`iconPosition`,void 0),e.r([e.s({type:Boolean,reflect:!0})],i.prototype,`external`,void 0),e.r([e.s({type:String,reflect:!0})],i.prototype,`target`,void 0);try{e.c(`pkt-link`)(i)}catch{console.warn(`Forsøker å definere <pkt-link>, men den er allerede definert`)}var a=i;Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { c as e, d as t, r as n, s as r } from "./element-cZ85T_aa.js";
|
|
2
|
+
import { n as i, t as a } from "./element-with-slot-4J2o3SeU.js";
|
|
3
|
+
import "./icon-Co72KtgF.js";
|
|
4
|
+
import { t as o } from "./if-defined-Cjj8qN-Z.js";
|
|
5
|
+
//#region src/components/linkcard/linkcard.ts
|
|
6
|
+
var s = class extends a {
|
|
7
|
+
constructor(...e) {
|
|
8
|
+
super(...e), this.title = "", this.href = "#", this.iconName = "", this.external = !1, this.openInNewTab = !1, this.skin = "normal";
|
|
9
|
+
}
|
|
10
|
+
render() {
|
|
11
|
+
let e = ["pkt-linkcard", this.skin && `pkt-linkcard--${this.skin}`].filter(Boolean).join(" "), n = ["pkt-linkcard__title", this.external && "pkt-link pkt-link--external"].filter(Boolean).join(" ");
|
|
12
|
+
return t`
|
|
13
|
+
<a
|
|
14
|
+
href=${this.href}
|
|
15
|
+
class=${e}
|
|
16
|
+
target=${this.openInNewTab ? "_blank" : "_self"}
|
|
17
|
+
rel=${o(this.openInNewTab ? "noopener noreferrer" : void 0)}
|
|
18
|
+
>
|
|
19
|
+
${this.iconName && t`<pkt-icon class="pkt-link__icon" name="${this.iconName}" />`}
|
|
20
|
+
${this.title && t`<div class=${n}>${this.title}</div>`}
|
|
21
|
+
|
|
22
|
+
<div class="pkt-linkcard__text">${i(this)}</div>
|
|
23
|
+
</a>
|
|
24
|
+
`;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
n([r({
|
|
28
|
+
type: String,
|
|
29
|
+
reflect: !0
|
|
30
|
+
})], s.prototype, "title", void 0), n([r({
|
|
31
|
+
type: String,
|
|
32
|
+
reflect: !0
|
|
33
|
+
})], s.prototype, "href", void 0), n([r({
|
|
34
|
+
type: String,
|
|
35
|
+
reflect: !0
|
|
36
|
+
})], s.prototype, "iconName", void 0), n([r({
|
|
37
|
+
type: Boolean,
|
|
38
|
+
reflect: !0
|
|
39
|
+
})], s.prototype, "external", void 0), n([r({
|
|
40
|
+
type: Boolean,
|
|
41
|
+
reflect: !0
|
|
42
|
+
})], s.prototype, "openInNewTab", void 0), n([r({
|
|
43
|
+
type: String,
|
|
44
|
+
reflect: !0
|
|
45
|
+
})], s.prototype, "skin", void 0);
|
|
46
|
+
try {
|
|
47
|
+
e("pkt-linkcard")(s);
|
|
48
|
+
} catch {
|
|
49
|
+
console.warn("Forsøker å definere <pkt-linkcard>, men den er allerede definert");
|
|
50
|
+
}
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region src/components/linkcard/index.ts
|
|
53
|
+
var c = s;
|
|
54
|
+
//#endregion
|
|
55
|
+
export { s as n, c as t };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const e=require(`./element-DjtxO-1r.cjs`),t=require(`./element-with-slot-CWoTGA1B.cjs`);require(`./icon-Dr8sfT2X.cjs`);const n=require(`./if-defined-XKOD_t_V.cjs`);var r=class extends t.t{constructor(...e){super(...e),this.title=``,this.href=`#`,this.iconName=``,this.external=!1,this.openInNewTab=!1,this.skin=`normal`}render(){let r=[`pkt-linkcard`,this.skin&&`pkt-linkcard--${this.skin}`].filter(Boolean).join(` `),i=[`pkt-linkcard__title`,this.external&&`pkt-link pkt-link--external`].filter(Boolean).join(` `);return e.d`
|
|
2
|
+
<a
|
|
3
|
+
href=${this.href}
|
|
4
|
+
class=${r}
|
|
5
|
+
target=${this.openInNewTab?`_blank`:`_self`}
|
|
6
|
+
rel=${n.t(this.openInNewTab?`noopener noreferrer`:void 0)}
|
|
7
|
+
>
|
|
8
|
+
${this.iconName&&e.d`<pkt-icon class="pkt-link__icon" name="${this.iconName}" />`}
|
|
9
|
+
${this.title&&e.d`<div class=${i}>${this.title}</div>`}
|
|
10
|
+
|
|
11
|
+
<div class="pkt-linkcard__text">${t.n(this)}</div>
|
|
12
|
+
</a>
|
|
13
|
+
`}};e.r([e.s({type:String,reflect:!0})],r.prototype,`title`,void 0),e.r([e.s({type:String,reflect:!0})],r.prototype,`href`,void 0),e.r([e.s({type:String,reflect:!0})],r.prototype,`iconName`,void 0),e.r([e.s({type:Boolean,reflect:!0})],r.prototype,`external`,void 0),e.r([e.s({type:Boolean,reflect:!0})],r.prototype,`openInNewTab`,void 0),e.r([e.s({type:String,reflect:!0})],r.prototype,`skin`,void 0);try{e.c(`pkt-linkcard`)(r)}catch{console.warn(`Forsøker å definere <pkt-linkcard>, men den er allerede definert`)}var i=r;Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return i}});
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
const e=require(`./element-DjtxO-1r.cjs`),t=require(`./class-map-CJ-msbHs.cjs`),n=require(`./if-defined-XKOD_t_V.cjs`),r=require(`./repeat-CqcDYBxr.cjs`),i=require(`./utils-CjAbIttF.cjs`);var a=(e,t)=>t&&(e.find(e=>e.value===t)||e.find(e=>e.label===t))||null,o=(e,t)=>{if(!t)return-1;let n=e.findIndex(e=>e.value===t);return n>=0?n:e.findIndex(e=>e.label===t)},s=(e,t)=>{if(!t)return[...e];let n=t.toLowerCase();return e.filter(e=>(e.fulltext||e.value+(e.label||``)+(e.prefix||``)).toLowerCase().includes(n))},c=e=>e.value+(e.label||``)+(e.prefix||``),l=(e,t)=>t!==null&&e>=t,u=(e,t)=>{if(!t)return{filtered:[...e],suggestion:null};let n=t.toLowerCase(),r=e.filter(e=>e.fulltext?.toLowerCase().includes(n));return{filtered:r,suggestion:r.find(e=>!e.selected&&e.label?.toLowerCase().startsWith(n))||null}},d=(e,t,n,r)=>{if(!e.trim())return{addValueText:null,userInfoMessage:``};let i=e.trim().toLowerCase(),a=t.find(e=>e.toLowerCase()===i),o=n.filter(e=>e.label?.toLowerCase().includes(i)||e.value.toLowerCase().includes(i)),s=o.find(e=>e.label?.toLowerCase()===i||e.value.toLowerCase()===i);return(o.length===0||!s)&&r?{addValueText:e,userInfoMessage:``}:o.length===0&&!r?{addValueText:null,userInfoMessage:`Ingen treff i søket`}:a?{addValueText:null,userInfoMessage:`Verdien er allerede valgt`}:{addValueText:null,userInfoMessage:``}},f=e=>/^[\p{L} ]$/u.test(e),p=(e=500)=>{let t=``,n;return{append:r=>(t+=r.toLowerCase(),n!==void 0&&clearTimeout(n),n=setTimeout(()=>{t=``},e),t),reset:()=>{t=``,n!==void 0&&(clearTimeout(n),n=void 0)},getBuffer:()=>t}},m=(e,t)=>{let n=t.toLowerCase();return e.findIndex(e=>e.textContent?.trim().toLowerCase().startsWith(n))},h=e=>{e.scrollIntoView({block:`nearest`}),window.setTimeout(()=>e.focus(),0)},g=e=>Array.from(e.querySelectorAll(`[role="option"]:not([data-disabled])`)||[]),_=e=>{let t=e.nextElementSibling;t&&h(t)},v=(e,t,n)=>{let r=e.previousElementSibling;if(e.dataset.index===`0`&&n){let e=t.querySelector(`[role="searchbox"]`);e&&h(e)}else r&&h(r)},y=e=>{let t=g(e);t[0]&&h(t[0])},b=e=>{let t=g(e),n=t[t.length-1];n&&h(n)},x=(e,t)=>{if(t.disabled)return;let n=g(e);if(t.allowUserInput&&t.customUserInput){let t=e.querySelector(`[data-type="new-option"]`);if(t){h(t);return}}let r=n.find(e=>e.dataset.selected===`true`);if(r){h(r);return}if(t.includeSearch&&!(document.activeElement instanceof HTMLInputElement)){let t=e.querySelector(`[role="searchbox"]`);if(t){window.setTimeout(()=>t.focus(),0);return}}n[0]&&h(n[0])},S=class extends e.t{constructor(...e){super(...e),this.id=i.n(),this.label=null,this.options=[],this.isOpen=!1,this.disabled=!1,this.includeSearch=!1,this.isMultiSelect=!1,this.allowUserInput=!1,this.maxIsReached=!1,this.customUserInput=null,this.searchPlaceholder=null,this.searchValue=null,this.maxLength=0,this.userMessage=null,this._selectedOptions=0,this.typeahead=p(),this._filteredOptions=[]}connectedCallback(){super.connectedCallback(),this.includeSearch&&!this.searchValue&&(this.searchValue=``),this.options.length>0&&this.filterOptions(),this.setAttribute(`tabindex`,`-1`),this.addEventListener(`focus`,this.focusFirstOrSelectedOption)}disconnectedCallback(){super.disconnectedCallback(),this.typeahead.reset()}updated(e){(e.has(`options`)||e.has(`searchValue`))&&this.filterOptions(),super.updated(e)}attributeChangedCallback(e,t,n){(e===`options`||e===`search-value`)&&this.filterOptions(),super.attributeChangedCallback(e,t,n)}get _hasOptions(){return this._filteredOptions.length>0||this.options.length>0}render(){return e.d`
|
|
2
|
+
<div
|
|
3
|
+
class=${t.t({"pkt-listbox":!0,"pkt-listbox__open":this.isOpen,"pkt-txt-16-light":!0})}
|
|
4
|
+
role=${n.t(this._hasOptions?`listbox`:void 0)}
|
|
5
|
+
aria-multiselectable=${n.t(this._hasOptions&&this.isMultiSelect?`true`:void 0)}
|
|
6
|
+
aria-label=${n.t(this._hasOptions?this.label??void 0:void 0)}
|
|
7
|
+
>
|
|
8
|
+
<div class="pkt-listbox__banners">
|
|
9
|
+
${this.renderSearch()} ${this.renderMaximumReachedBanner()} ${this.renderUserMessage()}
|
|
10
|
+
${this.renderEmptyMessage()} ${this.renderNewOptionBanner()}
|
|
11
|
+
</div>
|
|
12
|
+
<ul class="pkt-listbox__options" role="presentation">
|
|
13
|
+
${this.renderList()}
|
|
14
|
+
</ul>
|
|
15
|
+
</div>
|
|
16
|
+
<div aria-live="polite" class="pkt-visually-hidden">${this.userMessage}</div>
|
|
17
|
+
`}renderCheckboxOrCheckIcon(t,n){return this.isMultiSelect?e.d`
|
|
18
|
+
<input
|
|
19
|
+
class="pkt-input-check__input-checkbox"
|
|
20
|
+
type="checkbox"
|
|
21
|
+
role="presentation"
|
|
22
|
+
tabindex="-1"
|
|
23
|
+
value=${t.value}
|
|
24
|
+
@change=${e=>{e.stopPropagation()}}
|
|
25
|
+
.checked=${t.selected}
|
|
26
|
+
aria-labelledby=${this.id+`-option-label-`+n}
|
|
27
|
+
?disabled=${this.disabled||t.disabled||this.maxIsReached&&!t.selected}
|
|
28
|
+
/>
|
|
29
|
+
`:t.selected?e.d`<pkt-icon name="check-big"></pkt-icon>`:e.l}renderEmptyMessage(){return this.options.length>0||this._filteredOptions.length>0||this.userMessage?e.l:e.d`<div class="pkt-listbox__banner pkt-listbox__banner--empty">
|
|
30
|
+
<pkt-icon
|
|
31
|
+
class="pkt-listbox__banner-icon"
|
|
32
|
+
name="exclamation-mark-circle"
|
|
33
|
+
size="large"
|
|
34
|
+
></pkt-icon>
|
|
35
|
+
Tom liste
|
|
36
|
+
</div>`}renderList(){return e.d`
|
|
37
|
+
${r.t(this._filteredOptions,e=>e.value,(n,r)=>e.d`
|
|
38
|
+
<li
|
|
39
|
+
@click=${()=>{this.toggleOption(n)}}
|
|
40
|
+
aria-selected=${n.selected?`true`:`false`}
|
|
41
|
+
@keydown=${this.handleOptionKeydown}
|
|
42
|
+
class=${t.t({"pkt-listbox__option":!0,"pkt-listbox__option--selected":!!(!this.isMultiSelect&&n.selected),"pkt-listbox__option--checkBox":this.isMultiSelect})}
|
|
43
|
+
tabindex="${this.disabled||n.disabled?`-1`:`0`}"
|
|
44
|
+
data-index=${r}
|
|
45
|
+
data-value=${n.value}
|
|
46
|
+
data-selected=${n.selected?`true`:`false`}
|
|
47
|
+
?data-disabled=${this.disabled||n.disabled||this.maxIsReached&&!n.selected}
|
|
48
|
+
aria-disabled=${this.disabled||n.disabled||this.maxIsReached&&!n.selected?`true`:`false`}
|
|
49
|
+
role="option"
|
|
50
|
+
id=${`${this.id}-${r}`}
|
|
51
|
+
>
|
|
52
|
+
${this.renderCheckboxOrCheckIcon(n,r)}
|
|
53
|
+
<span class="pkt-listbox__option-label" id=${this.id+`-option-label-`+r}>
|
|
54
|
+
${n.prefix?e.d`<span class="pkt-listbox__option-prefix">${n.prefix}</span>`:e.l}
|
|
55
|
+
${n.label||n.value}
|
|
56
|
+
</span>
|
|
57
|
+
${n.description?e.d`<span class="pkt-listbox__option-description pkt-txt-14-light"
|
|
58
|
+
>${n.description}</span
|
|
59
|
+
>`:e.l}
|
|
60
|
+
</li>
|
|
61
|
+
`)}
|
|
62
|
+
`}renderNewOptionBanner(){return this.allowUserInput&&this.customUserInput?e.d`
|
|
63
|
+
<div
|
|
64
|
+
class="pkt-listbox__banner pkt-listbox__banner--new-option pkt-listbox__option"
|
|
65
|
+
data-type="new-option"
|
|
66
|
+
data-value=${this.customUserInput}
|
|
67
|
+
data-selected="false"
|
|
68
|
+
tabindex="0"
|
|
69
|
+
@click=${()=>this.toggleOption({value:this.customUserInput||``})}
|
|
70
|
+
@keydown=${this.handleOptionKeydown}
|
|
71
|
+
>
|
|
72
|
+
<pkt-icon class="pkt-listbox__banner-icon" name="plus-sign" size="large"></pkt-icon>
|
|
73
|
+
Legg til "${this.customUserInput}"
|
|
74
|
+
</div>
|
|
75
|
+
`:e.l}renderMaximumReachedBanner(){return this._selectedOptions=this.options.filter(e=>e.selected).length,this.isMultiSelect&&this._selectedOptions>0&&this.maxLength>0?e.d`
|
|
76
|
+
<div class="pkt-listbox__banner pkt-listbox__banner--maximum-reached">
|
|
77
|
+
${this._selectedOptions} av maks ${this.maxLength} mulige er valgt.
|
|
78
|
+
</div>
|
|
79
|
+
`:e.l}renderUserMessage(){return this.userMessage?e.d`<div class="pkt-listbox__banner pkt-listbox__banner--user-message">
|
|
80
|
+
<pkt-icon
|
|
81
|
+
class="pkt-listbox__banner-icon"
|
|
82
|
+
name="exclamation-mark-circle"
|
|
83
|
+
size="large"
|
|
84
|
+
></pkt-icon>
|
|
85
|
+
${this.userMessage}
|
|
86
|
+
</div>`:e.l}renderSearch(){return this.includeSearch?e.d`
|
|
87
|
+
<div class="pkt-listbox__search">
|
|
88
|
+
<span class="pkt-listbox__search-icon">
|
|
89
|
+
<pkt-icon name="magnifying-glass-small" size="large"></pkt-icon>
|
|
90
|
+
</span>
|
|
91
|
+
<input
|
|
92
|
+
class="pkt-txt-16-light"
|
|
93
|
+
type="text"
|
|
94
|
+
aria-label="Søk i listen"
|
|
95
|
+
form=""
|
|
96
|
+
placeholder=${this.searchPlaceholder||e.i.forms.search.placeholder}
|
|
97
|
+
@input=${this.handleSearchInput}
|
|
98
|
+
@keydown=${this.handleSearchKeydown}
|
|
99
|
+
.value=${this.searchValue}
|
|
100
|
+
data-type="searchbox"
|
|
101
|
+
?disabled=${this.disabled}
|
|
102
|
+
?readonly=${this.disabled}
|
|
103
|
+
role="searchbox"
|
|
104
|
+
/>
|
|
105
|
+
</div>
|
|
106
|
+
`:e.l}handleSearchInput(e){this.searchValue=e.target.value,this.dispatchEvent(new CustomEvent(`search`,{detail:this.searchValue,bubbles:!1}))}handleSearchKeydown(e){switch(e.key){case`Enter`:e.preventDefault();break;case`ArrowUp`:case`Escape`:this.closeOptions(),e.preventDefault();break;case`ArrowDown`:this.focusFirstOrSelectedOption();break;case`Tab`:this.tabClose();break}}handleOptionKeydown(e){let t=e.currentTarget,n=t.dataset.value,r=t.dataset.type,i=t.dataset.selected===`true`;if(!(!g(this).length&&(!this.customUserInput||!this.allowUserInput&&this.customUserInput)&&r!==`new-option`&&r!==`searchbox`))switch(e.key){case` `:case`Enter`:this.toggleOption(t),e.preventDefault();break;case`Backspace`:n&&(i?this.toggleOption(t):this.closeOptions()),e.preventDefault();break;case`Escape`:this.closeOptions(),e.preventDefault();break;case`Tab`:this.tabClose();break;case`ArrowDown`:e.altKey?b(this):r===`searchbox`||r===`new-option`?y(this):_(t),e.preventDefault();break;case`ArrowUp`:if(e.altKey)y(this);else if(t.dataset.index===`0`&&this.includeSearch){let e=this.querySelector(`[role="searchbox"]`);e&&e.focus()}else if(t.dataset.index===`0`&&this.customUserInput){let e=this.querySelector(`[data-type="new-option"]`);e&&e.focus()}else v(t,this,this.includeSearch);e.preventDefault();break;case`Home`:y(this),e.preventDefault();break;case`End`:b(this),e.preventDefault();break;default:(e.metaKey||e.ctrlKey)&&e.key===`a`&&(this.selectAll(),e.preventDefault()),f(e.key)&&(this.handleTypeAhead(e.key),e.preventDefault());break}}focusFirstOrSelectedOption(){x(this,{disabled:this.disabled,allowUserInput:this.allowUserInput,customUserInput:this.customUserInput,includeSearch:this.includeSearch})}toggleOption(e){let t=e instanceof HTMLElement?e.dataset.disabled:e.disabled;if(this.disabled||t)return;let n=e instanceof HTMLElement?e.dataset.value:e.value;this.dispatchEvent(new CustomEvent(`option-toggle`,{detail:n,bubbles:!1}))}selectAll(){this.dispatchEvent(new CustomEvent(`select-all`,{bubbles:!1}))}closeOptions(){this.dispatchEvent(new CustomEvent(`close-options`,{bubbles:!1}))}tabClose(){this.dispatchEvent(new CustomEvent(`tab-close`,{bubbles:!1}))}filterOptions(){this._filteredOptions=s(this.options,this.searchValue)}handleTypeAhead(e){let t=this.typeahead.append(e),n=g(this),r=m(n,t);r>=0&&h(n[r])}};e.r([e.s({type:String})],S.prototype,`id`,void 0),e.r([e.s({type:String})],S.prototype,`label`,void 0),e.r([e.s({type:Array})],S.prototype,`options`,void 0),e.r([e.s({type:Boolean,reflect:!0,attribute:`is-open`})],S.prototype,`isOpen`,void 0),e.r([e.s({type:Boolean})],S.prototype,`disabled`,void 0),e.r([e.s({type:Boolean,attribute:`include-search`})],S.prototype,`includeSearch`,void 0),e.r([e.s({type:Boolean,attribute:`is-multi-select`})],S.prototype,`isMultiSelect`,void 0),e.r([e.s({type:Boolean,attribute:`allow-user-input`})],S.prototype,`allowUserInput`,void 0),e.r([e.s({type:Boolean,attribute:`max-is-reached`})],S.prototype,`maxIsReached`,void 0),e.r([e.s({type:String,attribute:`custom-user-input`})],S.prototype,`customUserInput`,void 0),e.r([e.s({type:String,attribute:`search-placeholder`})],S.prototype,`searchPlaceholder`,void 0),e.r([e.s({type:String,attribute:`search-value`})],S.prototype,`searchValue`,void 0),e.r([e.s({type:Number,attribute:`max-length`})],S.prototype,`maxLength`,void 0),e.r([e.s({type:String,attribute:`user-message`})],S.prototype,`userMessage`,void 0),e.r([e.o()],S.prototype,`_filteredOptions`,void 0);try{e.c(`pkt-listbox`)(S)}catch{console.warn(`Forsøker å definere <pkt-listbox>, men den er allerede definert`)}var C=S;Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return C}});
|