@oslokommune/punkt-elements 12.42.10 → 12.42.12
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/{accordionitem-aQHOrGzf.js → accordionitem-Be6vyX31.js} +8 -7
- package/dist/{accordionitem-C4NQFQHo.cjs → accordionitem-ogt0KNGP.cjs} +5 -5
- package/dist/{alert-sBHt7DSh.js → alert-CZyqekhG.js} +22 -21
- package/dist/alert-DifeONO7.cjs +32 -0
- package/dist/{backlink-BnlrDl9O.js → backlink-C3dfam09.js} +12 -11
- package/dist/backlink-C9qmM67k.cjs +13 -0
- package/dist/{button-B4Oe8Ar0.js → button-OoC1RGJL.js} +8 -7
- package/dist/button-zO41ySZl.cjs +19 -0
- package/dist/calendar-BYYJH15O.cjs +108 -0
- package/dist/{calendar-Df6-FDRW.js → calendar-qEV4u3xs.js} +11 -10
- package/dist/{card-CXhVAeOG.cjs → card-CJue0Esh.cjs} +1 -1
- package/dist/{card-0Kf9L0A_.js → card-p-fcc7Wh.js} +9 -8
- package/dist/{checkbox-B67_cfqW.js → checkbox-BLI7dfpW.js} +4 -4
- package/dist/{checkbox-CiXWukkL.cjs → checkbox-iLywLQwL.cjs} +1 -1
- package/dist/{class-map-m7ZCZ49w.js → class-map-DO0E7GkW.js} +1 -1
- package/dist/{class-map-DWDPOqjO.cjs → class-map-dph2jLEp.cjs} +1 -1
- package/dist/{combobox-Dq7F5v-u.cjs → combobox-BJOVpwAW.cjs} +1 -1
- package/dist/{combobox-CsFDvh8U.js → combobox-C_Zj-ZxE.js} +11 -11
- package/dist/consent-BkgHuZ37.cjs +11 -0
- package/dist/{consent-B17ZIuwm.js → consent-C0pd0E2Q.js} +6 -5
- package/dist/{datepicker-DOf9XK9v.cjs → datepicker--I3DF-Ci.cjs} +1 -1
- package/dist/{datepicker-Cz6seIz1.js → datepicker-Y6-ORa5u.js} +11 -11
- package/dist/{directive-helpers--4ibN__v.js → directive-helpers-D2BEk_ct.js} +1 -1
- package/dist/{directive-helpers-v9b0v7lu.cjs → directive-helpers-lOXMtxMR.cjs} +2 -2
- package/dist/{element-gAd63VwC.js → element-Cfyyg4nF.js} +8658 -9250
- package/dist/element-DUJa1sRq.cjs +212 -0
- package/dist/heading-BWV1JThP.js +58 -0
- package/dist/heading-C6U6xiqH.cjs +1 -0
- package/dist/helptext-BxHMB-XH.cjs +24 -0
- package/dist/{helptext-BG_b6ytC.js → helptext-C7oP6VRp.js} +19 -18
- package/dist/{icon-CO1TLSs5.js → icon-DPnB79MP.js} +12 -11
- package/dist/{icon-B1_BRNqf.cjs → icon-RJ9Op-BB.cjs} +3 -3
- package/dist/if-defined-BQOEcjlp.cjs +5 -0
- package/dist/{if-defined-Cj-3Kdsr.js → if-defined-I-IZkUY2.js} +1 -1
- package/dist/index.d.ts +7 -6
- package/dist/input-element-B2JauW-Y.cjs +1 -0
- package/dist/{input-element-BEvaQK4g.js → input-element-CaCDNzdI.js} +7 -6
- package/dist/{input-wrapper-CC_R5w7V.js → input-wrapper-BDm0DwAW.js} +14 -13
- package/dist/{input-wrapper-Dk0rKRlz.cjs → input-wrapper-DrJgi10C.cjs} +4 -4
- package/dist/{link-C9X0huxP.js → link-BzKHhT3c.js} +12 -11
- package/dist/link-Dhs4dS0S.cjs +7 -0
- package/dist/{linkcard-Bhk2ttou.js → linkcard-CyepaY-g.js} +14 -13
- package/dist/{linkcard-CaBz6i7A.cjs → linkcard-Czsb01sQ.cjs} +1 -1
- package/dist/{listbox-AjDNhDsQ.cjs → listbox-BIcmMiAK.cjs} +7 -7
- package/dist/{listbox-DCWdrjFp.js → listbox-Br7v_BsA.js} +11 -10
- package/dist/lit-element-DHqqtYbj.cjs +27 -0
- package/dist/lit-element-DcUrSbRH.js +595 -0
- package/dist/loader-5lt2W9RX.cjs +11 -0
- package/dist/{loader-DMp859px.js → loader-Co35Rkbv.js} +16 -15
- package/dist/messagebox-BSUbetVQ.cjs +12 -0
- package/dist/{messagebox-_1f12rDq.js → messagebox-CQXmoqzD.js} +18 -17
- package/dist/modal-5PZ-TDkV.cjs +36 -0
- package/dist/{modal-C3kEgTMj.js → modal-DuubDFPT.js} +27 -26
- package/dist/pkt-accordion.cjs +1 -1
- package/dist/pkt-accordion.js +2 -2
- package/dist/pkt-alert.cjs +1 -1
- package/dist/pkt-alert.js +1 -1
- package/dist/pkt-backlink.cjs +1 -1
- package/dist/pkt-backlink.js +1 -1
- package/dist/pkt-button.cjs +1 -1
- package/dist/pkt-button.js +1 -1
- package/dist/pkt-calendar.cjs +1 -1
- package/dist/pkt-calendar.js +1 -1
- package/dist/pkt-card.cjs +1 -1
- package/dist/pkt-card.js +1 -1
- package/dist/pkt-checkbox.cjs +1 -1
- package/dist/pkt-checkbox.js +1 -1
- package/dist/pkt-combobox.cjs +1 -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 +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.cjs +1 -1
- package/dist/pkt-icon.js +1 -1
- package/dist/pkt-index.cjs +3 -3
- package/dist/pkt-index.js +63 -62
- 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-progressbar.cjs +1 -1
- package/dist/pkt-progressbar.js +2 -2
- package/dist/pkt-radiobutton.cjs +1 -1
- package/dist/pkt-radiobutton.js +1 -1
- package/dist/pkt-select.cjs +1 -1
- package/dist/pkt-select.js +1 -1
- package/dist/pkt-tag.cjs +1 -1
- package/dist/pkt-tag.js +1 -1
- package/dist/pkt-textarea.cjs +1 -1
- package/dist/pkt-textarea.js +1 -1
- package/dist/pkt-textinput.cjs +1 -1
- package/dist/pkt-textinput.js +1 -1
- package/dist/{progressbar-BSO0KWzv.js → progressbar-B75UwwRZ.js} +14 -13
- package/dist/{progressbar-BrXtjUvh.cjs → progressbar-DF8IG5IY.cjs} +7 -7
- package/dist/{radiobutton-BaIDDCwK.js → radiobutton-CDO-HMP_.js} +5 -5
- package/dist/{radiobutton-x10h-JEh.cjs → radiobutton-DUpADoLc.cjs} +1 -1
- package/dist/{ref-B-w1vCo8.cjs → ref-BMQZJJEo.cjs} +1 -1
- package/dist/{ref-DnSbnXsj.js → ref-DX488m2G.js} +2 -2
- package/dist/{repeat-CxQA3AeF.cjs → repeat-B93vZu9q.cjs} +1 -1
- package/dist/{repeat-lUFq9w5d.js → repeat-Dl4RVQIF.js} +2 -2
- package/dist/select-CE5L--Xw.cjs +48 -0
- package/dist/{select-BlL8T2BX.js → select-q7qkLeW4.js} +20 -20
- package/dist/{state-BxrO4zNJ.js → state-P2J1I2ny.js} +1 -1
- package/dist/{state-D-Recv7U.cjs → state-y-GU-VH8.cjs} +1 -1
- package/dist/{tag-m7OTZaCG.js → tag-OSIRLJc0.js} +21 -20
- package/dist/tag-sEPrma2U.cjs +18 -0
- package/dist/{textarea-Dk8hQMD2.js → textarea-BIvwbRBK.js} +22 -22
- package/dist/{textarea-Dc1sUaxx.cjs → textarea-BuhpS5Jj.cjs} +1 -1
- package/dist/{textinput-6Ip-0aVY.js → textinput-BFbenR3I.js} +8 -8
- package/dist/{textinput-DuLZ26DB.cjs → textinput-BUMlqXQC.cjs} +1 -1
- package/package.json +4 -4
- package/src/components/heading/heading.ts +63 -37
- package/dist/alert-DUWuhtFC.cjs +0 -32
- package/dist/backlink-CcAZfB1d.cjs +0 -13
- package/dist/button-BT-FRGMk.cjs +0 -19
- package/dist/calendar-D4qfcRtv.cjs +0 -108
- package/dist/consent-CILYIgC-.cjs +0 -11
- package/dist/element-90YeMNbV.cjs +0 -238
- package/dist/heading-CGGKEZve.js +0 -59
- package/dist/heading-Cmh5bbTl.cjs +0 -1
- package/dist/helptext-CC3qLmEz.cjs +0 -24
- package/dist/if-defined-C8eotHpL.cjs +0 -5
- package/dist/input-element-CInrWeac.cjs +0 -1
- package/dist/link-qTz-qNVI.cjs +0 -7
- package/dist/loader-BqYcg8Di.cjs +0 -11
- package/dist/messagebox-Do_nAUo3.cjs +0 -12
- package/dist/modal-C1inKvts.cjs +0 -36
- package/dist/select-BkVSXR5K.cjs +0 -48
- package/dist/tag-DrbI0ng3.cjs +0 -18
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";const s=require("./element-
|
|
1
|
+
"use strict";const s=require("./lit-element-DHqqtYbj.cjs"),h=require("./state-y-GU-VH8.cjs"),u=require("./if-defined-BQOEcjlp.cjs"),c=require("./element-DUJa1sRq.cjs"),d=require("./repeat-B93vZu9q.cjs"),p=require("./class-map-dph2jLEp.cjs"),b=require("./stringutils-CkVRq4jP.cjs");var f=Object.defineProperty,x=Object.getOwnPropertyDescriptor,n=(r,e,t,i)=>{for(var l=i>1?void 0:i?x(e,t):e,o=r.length-1,a;o>=0;o--)(a=r[o])&&(l=(i?a(e,t,l):a(l))||l);return i&&l&&f(e,t,l),l};exports.PktListbox=class extends c.PktElement{constructor(){super(...arguments),this.id=b.uuidish(),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._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)}updated(e){(e.has("options")||e.has("searchValue"))&&this.filterOptions(),super.updated(e)}attributeChangedCallback(e,t,i){(e==="options"||e==="searchValue"||e==="search-value")&&this.filterOptions(),super.attributeChangedCallback(e,t,i)}render(){return s.x`
|
|
2
2
|
<div
|
|
3
|
-
class=${
|
|
3
|
+
class=${p.e({"pkt-listbox":!0,"pkt-listbox__open":this.isOpen,"pkt-txt-16-light":!0})}
|
|
4
4
|
role="listbox"
|
|
5
|
-
aria-label=${
|
|
5
|
+
aria-label=${u.o(this.label)}
|
|
6
6
|
>
|
|
7
7
|
<div class="pkt-listbox__banners">
|
|
8
8
|
${this.renderMaximumReachedBanner()} ${this.renderUserMessage()}
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
?disabled=${this.disabled||e.disabled||this.maxIsReached&&!e.selected}
|
|
25
25
|
/>
|
|
26
26
|
`:e.selected?s.x`<pkt-icon name="check-big"></pkt-icon>`:s.E}renderList(){return s.x`
|
|
27
|
-
${
|
|
27
|
+
${d.c(this._filteredOptions,e=>e.value,(e,t)=>s.x`
|
|
28
28
|
<li
|
|
29
29
|
@click=${()=>{this.toggleOption(e)}}
|
|
30
30
|
aria-selected=${e.selected?"true":"false"}
|
|
31
31
|
@keydown=${this.handleOptionKeydown}
|
|
32
|
-
class=${
|
|
32
|
+
class=${p.e({"pkt-listbox__option":!0,"pkt-listbox__option--selected":!!(!this.isMultiSelect&&e.selected),"pkt-listbox__option--checkBox":this.isMultiSelect})}
|
|
33
33
|
tabindex="${this.disabled||e.disabled?"-1":"0"}"
|
|
34
34
|
data-index=${t}
|
|
35
35
|
data-value=${e.value}
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
type="text"
|
|
83
83
|
aria-label="Søk i listen"
|
|
84
84
|
form=""
|
|
85
|
-
placeholder=${this.searchPlaceholder||
|
|
85
|
+
placeholder=${this.searchPlaceholder||c.translations.forms.search.placeholder}
|
|
86
86
|
@input=${this.handleSearchInput}
|
|
87
87
|
@keydown=${this.handleSearchKeydown}
|
|
88
88
|
.value=${this.searchValue}
|
|
@@ -92,4 +92,4 @@
|
|
|
92
92
|
role="searchbox"
|
|
93
93
|
/>
|
|
94
94
|
</div>
|
|
95
|
-
`:s.E}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":case"Tab":this.focusFirstOrSelectedOption();break}}handleOptionKeydown(e){const t=e.currentTarget,i=t.dataset.value,
|
|
95
|
+
`:s.E}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":case"Tab":this.focusFirstOrSelectedOption();break}}handleOptionKeydown(e){const t=e.currentTarget,i=t.dataset.value,l=t.dataset.type,o=t.dataset.selected==="true";if(!(!this.getOptionElements().length&&(!this.customUserInput||!this.allowUserInput&&this.customUserInput)&&l!=="new-option"&&l!=="searchbox"))switch(e.key){case" ":case"Enter":this.toggleOption(t),e.preventDefault();break;case"Backspace":i&&(o?this.toggleOption(t):this.closeOptions()),e.preventDefault();break;case"Escape":case"Tab":this.closeOptions();break;case"ArrowDown":e.altKey?this.focusLastOption():l==="searchbox"||l==="new-option"?this.focusFirstOption():this.focusNextOption(t),e.preventDefault();break;case"ArrowUp":if(e.altKey)this.focusFirstOption();else if(t.dataset.index==="0"&&this.includeSearch){const a=this.querySelector('[role="searchbox"]');a&&a.focus()}else if(t.dataset.index==="0"&&this.customUserInput){const a=this.querySelector('[data-type="new-option"]');a&&a.focus()}else this.focusPreviousOption(t);e.preventDefault();break;case"Home":this.focusFirstOption(),e.preventDefault();break;case"End":this.focusLastOption(),e.preventDefault();break;default:(e.metaKey||e.ctrlKey)&&e.key==="a"&&(this.selectAll(),e.preventDefault()),this.isLetterOrSpace(e.key)&&(this.handleTypeAhead(e.key),e.preventDefault());break}}focusAndScrollIntoView(e){e.scrollIntoView({block:"nearest"}),window.setTimeout(()=>e.focus(),0)}focusNextOption(e){const t=e.nextElementSibling;t&&this.focusAndScrollIntoView(t)}focusPreviousOption(e){const t=e.previousElementSibling;if(e.dataset.index==="0"&&this.includeSearch){const i=this.querySelector('[role="searchbox"]');i&&this.focusAndScrollIntoView(i)}else t&&this.focusAndScrollIntoView(t)}focusFirstOption(){const e=this.getOptionElements()[0];e&&this.focusAndScrollIntoView(e)}focusLastOption(){const e=this.getOptionElements().pop();e&&this.focusAndScrollIntoView(e)}focusFirstOrSelectedOption(){if(this.disabled)return;const e=this.getOptionElements().find(t=>t.dataset.selected==="true");if(this.allowUserInput&&this.customUserInput){const t=this.querySelector('[data-type="new-option"]');this.focusAndScrollIntoView(t)}else if(e)this.focusAndScrollIntoView(e);else if(this.includeSearch&&!(document.activeElement instanceof HTMLInputElement)){const t=this.querySelector('[role="searchbox"]');window.setTimeout(()=>t.focus(),0)}else this.focusFirstOption()}toggleOption(e){const t=e instanceof HTMLElement?e.dataset.disabled:e.disabled;if(this.disabled||t)return;const i=e instanceof HTMLElement?e.dataset.value:e.value;this.dispatchEvent(new CustomEvent("option-toggle",{detail:i,bubbles:!1}))}selectAll(){this.dispatchEvent(new CustomEvent("select-all",{bubbles:!1}))}closeOptions(){this.dispatchEvent(new CustomEvent("close-options",{bubbles:!1}))}filterOptions(){this.searchValue?this._filteredOptions=this.options.filter(e=>{var i;return(e.label+e.value).toLowerCase().includes(((i=this.searchValue)==null?void 0:i.toLowerCase())||"")}):this._filteredOptions=[...this.options]}isLetterOrSpace(e){return/^[\p{L} ]$/u.test(e)}handleTypeAhead(e){this.typeAheadString+=e.toLowerCase(),this.typeAheadTimeout&&clearTimeout(this.typeAheadTimeout),this.typeAheadTimeout=window.setTimeout(()=>{this.typeAheadString=""},500);const i=this.getOptionElements().find(l=>{var o;return(o=l.textContent)==null?void 0:o.trim().toLowerCase().startsWith(this.typeAheadString)});i&&this.focusAndScrollIntoView(i)}getOptionElements(){return this._filteredOptions.length?Array.from(this.querySelectorAll('[role="option"]:not([data-disabled])')||[]):[]}};n([s.n({type:String})],exports.PktListbox.prototype,"id",2);n([s.n({type:String})],exports.PktListbox.prototype,"label",2);n([s.n({type:Array})],exports.PktListbox.prototype,"options",2);n([s.n({type:Boolean,reflect:!0})],exports.PktListbox.prototype,"isOpen",2);n([s.n({type:Boolean})],exports.PktListbox.prototype,"disabled",2);n([s.n({type:Boolean})],exports.PktListbox.prototype,"includeSearch",2);n([s.n({type:Boolean})],exports.PktListbox.prototype,"isMultiSelect",2);n([s.n({type:Boolean})],exports.PktListbox.prototype,"allowUserInput",2);n([s.n({type:Boolean})],exports.PktListbox.prototype,"maxIsReached",2);n([s.n({type:String})],exports.PktListbox.prototype,"customUserInput",2);n([s.n({type:String})],exports.PktListbox.prototype,"searchPlaceholder",2);n([s.n({type:String})],exports.PktListbox.prototype,"searchValue",2);n([s.n({type:Number})],exports.PktListbox.prototype,"maxLength",2);n([s.n({type:String})],exports.PktListbox.prototype,"userMessage",2);n([h.r()],exports.PktListbox.prototype,"_filteredOptions",2);exports.PktListbox=n([s.t("pkt-listbox")],exports.PktListbox);
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as
|
|
3
|
-
import { o as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { x as r, E as p, n as l, t as u } from "./lit-element-DcUrSbRH.js";
|
|
2
|
+
import { r as b } from "./state-P2J1I2ny.js";
|
|
3
|
+
import { o as f } from "./if-defined-I-IZkUY2.js";
|
|
4
|
+
import { P as m, t as y } from "./element-Cfyyg4nF.js";
|
|
5
|
+
import { c as k } from "./repeat-Dl4RVQIF.js";
|
|
6
|
+
import { e as d } from "./class-map-DO0E7GkW.js";
|
|
6
7
|
import { u as x } from "./stringutils-DJjRa8dG.js";
|
|
7
8
|
var O = Object.defineProperty, g = Object.getOwnPropertyDescriptor, a = (e, t, s, o) => {
|
|
8
9
|
for (var n = o > 1 ? void 0 : o ? g(t, s) : t, c = e.length - 1, h; c >= 0; c--)
|
|
9
10
|
(h = e[c]) && (n = (o ? h(t, s, n) : h(n)) || n);
|
|
10
11
|
return o && n && O(t, s, n), n;
|
|
11
12
|
};
|
|
12
|
-
let i = class extends
|
|
13
|
+
let i = class extends m {
|
|
13
14
|
constructor() {
|
|
14
15
|
super(...arguments), this.id = x(), 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._filteredOptions = [];
|
|
15
16
|
}
|
|
@@ -33,7 +34,7 @@ let i = class extends u {
|
|
|
33
34
|
"pkt-txt-16-light": !0
|
|
34
35
|
})}
|
|
35
36
|
role="listbox"
|
|
36
|
-
aria-label=${
|
|
37
|
+
aria-label=${f(this.label)}
|
|
37
38
|
>
|
|
38
39
|
<div class="pkt-listbox__banners">
|
|
39
40
|
${this.renderMaximumReachedBanner()} ${this.renderUserMessage()}
|
|
@@ -143,7 +144,7 @@ let i = class extends u {
|
|
|
143
144
|
type="text"
|
|
144
145
|
aria-label="Søk i listen"
|
|
145
146
|
form=""
|
|
146
|
-
placeholder=${this.searchPlaceholder ||
|
|
147
|
+
placeholder=${this.searchPlaceholder || y.forms.search.placeholder}
|
|
147
148
|
@input=${this.handleSearchInput}
|
|
148
149
|
@keydown=${this.handleSearchKeydown}
|
|
149
150
|
.value=${this.searchValue}
|
|
@@ -350,10 +351,10 @@ a([
|
|
|
350
351
|
l({ type: String })
|
|
351
352
|
], i.prototype, "userMessage", 2);
|
|
352
353
|
a([
|
|
353
|
-
|
|
354
|
+
b()
|
|
354
355
|
], i.prototype, "_filteredOptions", 2);
|
|
355
356
|
i = a([
|
|
356
|
-
|
|
357
|
+
u("pkt-listbox")
|
|
357
358
|
], i);
|
|
358
359
|
export {
|
|
359
360
|
i as P
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2017 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/const C=globalThis,N=C.trustedTypes,W=N?N.createPolicy("lit-html",{createHTML:r=>r}):void 0,et="$lit$",_=`lit$${Math.random().toFixed(9).slice(2)}$`,st="?"+_,ot=`<${st}>`,g=document,x=()=>g.createComment(""),O=r=>r===null||typeof r!="object"&&typeof r!="function",I=Array.isArray,ht=r=>I(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",D=`[
|
|
6
|
+
\f\r]`,w=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,V=/-->/g,Z=/>/g,A=RegExp(`>|${D}(?:([^\\s"'>=/]+)(${D}*=${D}*(?:[^
|
|
7
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),J=/'/g,K=/"/g,it=/^(?:script|style|textarea|title)$/i,at=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),lt=at(1),v=Symbol.for("lit-noChange"),c=Symbol.for("lit-nothing"),F=new WeakMap,m=g.createTreeWalker(g,129);function rt(r,t){if(!I(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return W!==void 0?W.createHTML(t):t}const ct=(r,t)=>{const e=r.length-1,s=[];let i,n=t===2?"<svg>":t===3?"<math>":"",o=w;for(let a=0;a<e;a++){const h=r[a];let d,p,l=-1,u=0;for(;u<h.length&&(o.lastIndex=u,p=o.exec(h),p!==null);)u=o.lastIndex,o===w?p[1]==="!--"?o=V:p[1]!==void 0?o=Z:p[2]!==void 0?(it.test(p[2])&&(i=RegExp("</"+p[2],"g")),o=A):p[3]!==void 0&&(o=A):o===A?p[0]===">"?(o=i??w,l=-1):p[1]===void 0?l=-2:(l=o.lastIndex-p[2].length,d=p[1],o=p[3]===void 0?A:p[3]==='"'?K:J):o===K||o===J?o=A:o===V||o===Z?o=w:(o=A,i=void 0);const $=o===A&&r[a+1].startsWith("/>")?" ":"";n+=o===w?h+ot:l>=0?(s.push(d),h.slice(0,l)+et+h.slice(l)+_+$):h+_+(l===-2?a:$)}return[rt(r,n+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class M{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,o=0;const a=t.length-1,h=this.parts,[d,p]=ct(t,e);if(this.el=M.createElement(d,s),m.currentNode=this.el.content,e===2||e===3){const l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(i=m.nextNode())!==null&&h.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(const l of i.getAttributeNames())if(l.endsWith(et)){const u=p[o++],$=i.getAttribute(l).split(_),H=/([.?@])?(.*)/.exec(u);h.push({type:1,index:n,name:H[2],strings:$,ctor:H[1]==="."?pt:H[1]==="?"?ut:H[1]==="@"?$t:k}),i.removeAttribute(l)}else l.startsWith(_)&&(h.push({type:6,index:n}),i.removeAttribute(l));if(it.test(i.tagName)){const l=i.textContent.split(_),u=l.length-1;if(u>0){i.textContent=N?N.emptyScript:"";for(let $=0;$<u;$++)i.append(l[$],x()),m.nextNode(),h.push({type:2,index:++n});i.append(l[u],x())}}}else if(i.nodeType===8)if(i.data===st)h.push({type:2,index:n});else{let l=-1;for(;(l=i.data.indexOf(_,l+1))!==-1;)h.push({type:7,index:n}),l+=_.length-1}n++}}static createElement(t,e){const s=g.createElement("template");return s.innerHTML=t,s}}function S(r,t,e=r,s){var o,a;if(t===v)return t;let i=s!==void 0?(o=e._$Co)==null?void 0:o[s]:e._$Cl;const n=O(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==n&&((a=i==null?void 0:i._$AO)==null||a.call(i,!1),n===void 0?i=void 0:(i=new n(r),i._$AT(r,e,s)),s!==void 0?(e._$Co??(e._$Co=[]))[s]=i:e._$Cl=i),i!==void 0&&(t=S(r,i._$AS(r,t.values),i,s)),t}class dt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=((t==null?void 0:t.creationScope)??g).importNode(e,!0);m.currentNode=i;let n=m.nextNode(),o=0,a=0,h=s[0];for(;h!==void 0;){if(o===h.index){let d;h.type===2?d=new b(n,n.nextSibling,this,t):h.type===1?d=new h.ctor(n,h.name,h.strings,this,t):h.type===6&&(d=new _t(n,this,t)),this._$AV.push(d),h=s[++a]}o!==(h==null?void 0:h.index)&&(n=m.nextNode(),o++)}return m.currentNode=g,i}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class b{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=c,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=(i==null?void 0:i.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=S(this,t,e),O(t)?t===c||t==null||t===""?(this._$AH!==c&&this._$AR(),this._$AH=c):t!==this._$AH&&t!==v&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):ht(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==c&&O(this._$AH)?this._$AA.nextSibling.data=t:this.T(g.createTextNode(t)),this._$AH=t}$(t){var n;const{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=M.createElement(rt(s.h,s.h[0]),this.options)),s);if(((n=this._$AH)==null?void 0:n._$AD)===i)this._$AH.p(e);else{const o=new dt(i,this),a=o.u(this.options);o.p(e),this.T(a),this._$AH=o}}_$AC(t){let e=F.get(t.strings);return e===void 0&&F.set(t.strings,e=new M(t)),e}k(t){I(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const n of t)i===e.length?e.push(s=new b(this.O(x()),this.O(x()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class k{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=c,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=c}_$AI(t,e=this,s,i){const n=this.strings;let o=!1;if(n===void 0)t=S(this,t,e,0),o=!O(t)||t!==this._$AH&&t!==v,o&&(this._$AH=t);else{const a=t;let h,d;for(t=n[0],h=0;h<n.length-1;h++)d=S(this,a[s+h],e,h),d===v&&(d=this._$AH[h]),o||(o=!O(d)||d!==this._$AH[h]),d===c?t=c:t!==c&&(t+=(d??"")+n[h+1]),this._$AH[h]=d}o&&!i&&this.j(t)}j(t){t===c?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class pt extends k{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===c?void 0:t}}class ut extends k{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==c)}}class $t extends k{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){if((t=S(this,t,e,0)??c)===v)return;const s=this._$AH,i=t===c&&s!==c||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==c&&(s===c||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class _t{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}}const ft={I:b},j=C.litHtmlPolyfillSupport;j==null||j(M,b),(C.litHtmlVersions??(C.litHtmlVersions=[])).push("3.3.0");const At=(r,t,e)=>{const s=(e==null?void 0:e.renderBefore)??t;let i=s._$litPart$;if(i===void 0){const n=(e==null?void 0:e.renderBefore)??null;s._$litPart$=i=new b(t.insertBefore(x(),n),n,void 0,e??{})}return i._$AI(r),i};/**
|
|
8
|
+
* @license
|
|
9
|
+
* Copyright 2017 Google LLC
|
|
10
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
+
*/const mt=r=>(t,e)=>{e!==void 0?e.addInitializer(()=>{customElements.define(r,t)}):customElements.define(r,t)};/**
|
|
12
|
+
* @license
|
|
13
|
+
* Copyright 2019 Google LLC
|
|
14
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
15
|
+
*/const T=globalThis,B=T.ShadowRoot&&(T.ShadyCSS===void 0||T.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,nt=Symbol(),G=new WeakMap;let yt=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==nt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(B&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=G.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&G.set(e,t))}return t}toString(){return this.cssText}};const gt=r=>new yt(typeof r=="string"?r:r+"",void 0,nt),vt=(r,t)=>{if(B)r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const s=document.createElement("style"),i=T.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,r.appendChild(s)}},Q=B?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return gt(e)})(r):r;/**
|
|
16
|
+
* @license
|
|
17
|
+
* Copyright 2017 Google LLC
|
|
18
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
+
*/const{is:Et,defineProperty:St,getOwnPropertyDescriptor:bt,getOwnPropertyNames:wt,getOwnPropertySymbols:Ct,getPrototypeOf:Pt}=Object,f=globalThis,X=f.trustedTypes,Ut=X?X.emptyScript:"",z=f.reactiveElementPolyfillSupport,P=(r,t)=>r,R={toAttribute(r,t){switch(t){case Boolean:r=r?Ut:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},q=(r,t)=>!Et(r,t),Y={attribute:!0,type:String,converter:R,reflect:!1,useDefault:!1,hasChanged:q};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),f.litPropertyMetadata??(f.litPropertyMetadata=new WeakMap);class E extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Y){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&St(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:n}=bt(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get:i,set(o){const a=i==null?void 0:i.call(this);n==null||n.call(this,o),this.requestUpdate(t,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Y}static _$Ei(){if(this.hasOwnProperty(P("elementProperties")))return;const t=Pt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(P("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(P("properties"))){const e=this.properties,s=[...wt(e),...Ct(e)];for(const i of s)this.createProperty(i,e[i])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const i of s)e.unshift(Q(i))}else t!==void 0&&e.push(Q(t));return e}static _$Eu(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return vt(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostConnected)==null?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){var n;const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){const o=(((n=s.converter)==null?void 0:n.toAttribute)!==void 0?s.converter:R).toAttribute(e,s.type);this._$Em=t,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(t,e){var n,o;const s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const a=s.getPropertyOptions(i),h=typeof a.converter=="function"?{fromAttribute:a.converter}:((n=a.converter)==null?void 0:n.fromAttribute)!==void 0?a.converter:R;this._$Em=i,this[i]=h.fromAttribute(e,a.type)??((o=this._$Ej)==null?void 0:o.get(i))??null,this._$Em=null}}requestUpdate(t,e,s){var i;if(t!==void 0){const n=this.constructor,o=this[t];if(s??(s=n.getPropertyOptions(t)),!((s.hasChanged??q)(o,e)||s.useDefault&&s.reflect&&o===((i=this._$Ej)==null?void 0:i.get(t))&&!this.hasAttribute(n._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:i,wrapped:n},o){s&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,o??e??this[t]),n!==!0||o!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),i===!0&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[n,o]of this._$Ep)this[n]=o;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[n,o]of i){const{wrapped:a}=o,h=this[n];a!==!0||this._$AL.has(n)||h===void 0||this.C(n,void 0,o,h)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(s=this._$EO)==null||s.forEach(i=>{var n;return(n=i.hostUpdate)==null?void 0:n.call(i)}),this.update(e)):this._$EM()}catch(i){throw t=!1,this._$EM(),i}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach(e=>this._$ET(e,this[e]))),this._$EM()}updated(t){}firstUpdated(t){}}E.elementStyles=[],E.shadowRootOptions={mode:"open"},E[P("elementProperties")]=new Map,E[P("finalized")]=new Map,z==null||z({ReactiveElement:E}),(f.reactiveElementVersions??(f.reactiveElementVersions=[])).push("2.1.0");/**
|
|
20
|
+
* @license
|
|
21
|
+
* Copyright 2017 Google LLC
|
|
22
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
+
*/const xt={attribute:!0,type:String,converter:R,reflect:!1,hasChanged:q},Ot=(r=xt,t,e)=>{const{kind:s,metadata:i}=e;let n=globalThis.litPropertyMetadata.get(i);if(n===void 0&&globalThis.litPropertyMetadata.set(i,n=new Map),s==="setter"&&((r=Object.create(r)).wrapped=!0),n.set(e.name,r),s==="accessor"){const{name:o}=e;return{set(a){const h=t.get.call(this);t.set.call(this,a),this.requestUpdate(o,h,r)},init(a){return a!==void 0&&this.C(o,void 0,r,a),a}}}if(s==="setter"){const{name:o}=e;return function(a){const h=this[o];t.call(this,a),this.requestUpdate(o,h,r)}}throw Error("Unsupported decorator location: "+s)};function Mt(r){return(t,e)=>typeof e=="object"?Ot(r,t,e):((s,i,n)=>{const o=i.hasOwnProperty(n);return i.constructor.createProperty(n,s),o?Object.getOwnPropertyDescriptor(i,n):void 0})(r,t,e)}/**
|
|
24
|
+
* @license
|
|
25
|
+
* Copyright 2017 Google LLC
|
|
26
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
+
*/const y=globalThis;class U extends E{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=At(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return v}}var tt;U._$litElement$=!0,U.finalized=!0,(tt=y.litElementHydrateSupport)==null||tt.call(y,{LitElement:U});const L=y.litElementPolyfillSupport;L==null||L({LitElement:U});(y.litElementVersions??(y.litElementVersions=[])).push("4.2.0");exports.E=c;exports.T=v;exports.Z=ft;exports.i=U;exports.n=Mt;exports.t=mt;exports.x=lt;
|