@oslokommune/punkt-elements 12.42.12 → 12.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/{accordionitem-Be6vyX31.js → accordionitem-C9FI-NXW.js} +7 -8
- package/dist/{accordionitem-ogt0KNGP.cjs → accordionitem-DjAWPtsn.cjs} +5 -5
- package/dist/{alert-CZyqekhG.js → alert-B0OUR9oD.js} +21 -22
- package/dist/alert-BH0lJ2ny.cjs +32 -0
- package/dist/{backlink-C3dfam09.js → backlink-B13JTp9D.js} +11 -12
- package/dist/backlink-C5jQRMwJ.cjs +13 -0
- package/dist/button-CDocR7iN.cjs +19 -0
- package/dist/{button-OoC1RGJL.js → button-DrrEvUy9.js} +7 -8
- package/dist/calendar-BZe2D4Sr.cjs +108 -0
- package/dist/{calendar-qEV4u3xs.js → calendar-DevQhOup.js} +10 -11
- package/dist/{card-CJue0Esh.cjs → card-Bx36j0q4.cjs} +1 -1
- package/dist/{card-p-fcc7Wh.js → card-Djnd-pgo.js} +8 -9
- package/dist/{checkbox-iLywLQwL.cjs → checkbox-CJ4tK9RC.cjs} +1 -1
- package/dist/{checkbox-BLI7dfpW.js → checkbox-cD_5LDzV.js} +4 -4
- package/dist/{class-map-dph2jLEp.cjs → class-map-BBG2gMX4.cjs} +1 -1
- package/dist/{class-map-DO0E7GkW.js → class-map-BpTj9gtz.js} +1 -1
- package/dist/{combobox-BJOVpwAW.cjs → combobox-Cv6i7BEk.cjs} +1 -1
- package/dist/{combobox-C_Zj-ZxE.js → combobox-kWGI4RHI.js} +11 -11
- package/dist/{consent-C0pd0E2Q.js → consent-CftYu8Di.js} +5 -6
- package/dist/consent-DrS71kvz.cjs +11 -0
- package/dist/{datepicker--I3DF-Ci.cjs → datepicker-BJe92Vor.cjs} +1 -1
- package/dist/{datepicker-Y6-ORa5u.js → datepicker-LpbYHx8L.js} +11 -11
- package/dist/{directive-helpers-lOXMtxMR.cjs → directive-helpers-BBbxqP2W.cjs} +2 -2
- package/dist/{directive-helpers-D2BEk_ct.js → directive-helpers-r-kOS_Mf.js} +1 -1
- package/dist/element-6DBpyGQm.cjs +238 -0
- package/dist/{element-Cfyyg4nF.js → element-CgEWt74-.js} +9272 -9157
- package/dist/heading-BRE_iFtR.cjs +1 -0
- package/dist/{heading-BWV1JThP.js → heading-D6jXE_Mz.js} +4 -4
- package/dist/{helptext-C7oP6VRp.js → helptext-B7eI0iBQ.js} +18 -19
- package/dist/helptext-CzQX6YVE.cjs +24 -0
- package/dist/{icon-RJ9Op-BB.cjs → icon-B_ryAy4Q.cjs} +3 -3
- package/dist/{icon-DPnB79MP.js → icon-CC1js8eR.js} +11 -12
- package/dist/{if-defined-I-IZkUY2.js → if-defined-CmuO4Vz9.js} +1 -1
- package/dist/if-defined-Cni-RHLS.cjs +5 -0
- package/dist/index.d.ts +27 -27
- package/dist/input-element-CHjLWeKt.cjs +1 -0
- package/dist/input-element-Cco4PA2M.js +700 -0
- package/dist/{input-wrapper-DrJgi10C.cjs → input-wrapper-BxZf8wEP.cjs} +4 -4
- package/dist/{input-wrapper-BDm0DwAW.js → input-wrapper-gz7ppKrK.js} +13 -14
- package/dist/{link-BzKHhT3c.js → link-C76H6Qf1.js} +11 -12
- package/dist/link-DTkjNlmy.cjs +7 -0
- package/dist/{linkcard-CyepaY-g.js → linkcard-BVEsUPwG.js} +13 -14
- package/dist/{linkcard-Czsb01sQ.cjs → linkcard-BlMhPNry.cjs} +1 -1
- package/dist/{listbox-BIcmMiAK.cjs → listbox-C4supLfR.cjs} +7 -7
- package/dist/{listbox-Br7v_BsA.js → listbox-CLsSW32I.js} +10 -11
- package/dist/loader-CHPxY9c6.cjs +11 -0
- package/dist/{loader-Co35Rkbv.js → loader-Da4IOk_T.js} +15 -16
- package/dist/messagebox-CqUBJs_D.cjs +12 -0
- package/dist/{messagebox-CQXmoqzD.js → messagebox-DwGdcdm7.js} +17 -18
- package/dist/modal-BdA5aWGU.cjs +36 -0
- package/dist/{modal-DuubDFPT.js → modal-DcXPnFus.js} +26 -27
- 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 +62 -63
- 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-DF8IG5IY.cjs → progressbar-DhMBXkww.cjs} +7 -7
- package/dist/{progressbar-B75UwwRZ.js → progressbar-Dj_mI_A6.js} +13 -14
- package/dist/{radiobutton-DUpADoLc.cjs → radiobutton-0vVqu-GU.cjs} +1 -1
- package/dist/{radiobutton-CDO-HMP_.js → radiobutton-BcFRJFvI.js} +5 -5
- package/dist/{ref-DX488m2G.js → ref-BBYSqgeW.js} +2 -2
- package/dist/{ref-BMQZJJEo.cjs → ref-iJtiv3o2.cjs} +1 -1
- package/dist/{repeat-Dl4RVQIF.js → repeat-C8BeHwYx.js} +2 -2
- package/dist/{repeat-B93vZu9q.cjs → repeat-CDsZqct8.cjs} +1 -1
- package/dist/{select-q7qkLeW4.js → select-BaLHLuvH.js} +20 -20
- package/dist/select-CFpdOlDE.cjs +48 -0
- package/dist/{state-P2J1I2ny.js → state-Bo2bck5_.js} +1 -1
- package/dist/{state-y-GU-VH8.cjs → state-DPobt-Yz.cjs} +1 -1
- package/dist/{tag-OSIRLJc0.js → tag-BWm6s48d.js} +20 -21
- package/dist/tag-DPk3fpEg.cjs +18 -0
- package/dist/{textarea-BuhpS5Jj.cjs → textarea-CViiuZdR.cjs} +1 -1
- package/dist/{textarea-BIvwbRBK.js → textarea-EIFo7GZz.js} +22 -22
- package/dist/{textinput-BFbenR3I.js → textinput-BHS7b-Jt.js} +8 -8
- package/dist/{textinput-BUMlqXQC.cjs → textinput-_ZdyMA9O.cjs} +1 -1
- package/package.json +4 -4
- package/src/components/heading/heading.ts +3 -2
- package/dist/alert-DifeONO7.cjs +0 -32
- package/dist/backlink-C9qmM67k.cjs +0 -13
- package/dist/button-zO41ySZl.cjs +0 -19
- package/dist/calendar-BYYJH15O.cjs +0 -108
- package/dist/consent-BkgHuZ37.cjs +0 -11
- package/dist/element-DUJa1sRq.cjs +0 -212
- package/dist/heading-C6U6xiqH.cjs +0 -1
- package/dist/helptext-BxHMB-XH.cjs +0 -24
- package/dist/if-defined-BQOEcjlp.cjs +0 -5
- package/dist/input-element-B2JauW-Y.cjs +0 -1
- package/dist/input-element-CaCDNzdI.js +0 -230
- package/dist/link-Dhs4dS0S.cjs +0 -7
- package/dist/lit-element-DHqqtYbj.cjs +0 -27
- package/dist/lit-element-DcUrSbRH.js +0 -595
- package/dist/loader-5lt2W9RX.cjs +0 -11
- package/dist/messagebox-BSUbetVQ.cjs +0 -12
- package/dist/modal-5PZ-TDkV.cjs +0 -36
- package/dist/select-CE5L--Xw.cjs +0 -48
- package/dist/tag-sEPrma2U.cjs +0 -18
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const i=require("./lit-element-DHqqtYbj.cjs");var h=Object.defineProperty,p=Object.getOwnPropertyDescriptor,l=(n,t,a,e)=>{for(var s=e>1?void 0:e?p(t,a):t,d=n.length-1,r;d>=0;d--)(r=n[d])&&(s=(e?r(t,a,s):r(s))||s);return e&&s&&h(t,a,s),s};exports.PktHeading=class extends i.i{constructor(){super(...arguments),this.size="medium",this.level=2,this.visuallyHidden=!1,this.align="start"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","heading"),this.setAttribute("aria-level",String(this.level)),this.updateHostClasses()}attributeChangedCallback(t,a,e){super.attributeChangedCallback(t,a,e),t==="level"&&e&&this.setLevel(Number(e)),(t==="size"||t==="visuallyHidden"||t==="align")&&this.updateHostClasses()}updated(t){super.updated(t),t.has("level")&&this.setLevel(this.level),(t.has("size")||t.has("visuallyHidden")||t.has("align"))&&this.updateHostClasses()}setLevel(t){t>=1&&t<=6?(this.level=t,this.setAttribute("aria-level",String(t))):console.warn(`Invalid heading level: ${t}. Must be between 1 and 6.`)}updateHostClasses(){this.classList.remove("pkt-heading","pkt-heading--xsmall","pkt-heading--small","pkt-heading--medium","pkt-heading--large","pkt-heading--xlarge","pkt-sr-only","pkt-heading--start","pkt-heading--center","pkt-heading--end"),this.classList.add("pkt-heading"),this.size&&this.classList.add(`pkt-heading--${this.size}`),this.visuallyHidden&&this.classList.add("pkt-sr-only"),this.align&&this.classList.add(`pkt-heading--${this.align}`)}render(){return i.x`<slot></slot>`}};l([i.n({type:String,reflect:!0})],exports.PktHeading.prototype,"size",2);l([i.n({type:Number,reflect:!0})],exports.PktHeading.prototype,"level",2);l([i.n({type:Boolean,reflect:!0})],exports.PktHeading.prototype,"visuallyHidden",2);l([i.n({type:String,reflect:!0})],exports.PktHeading.prototype,"align",2);exports.PktHeading=l([i.t("pkt-heading")],exports.PktHeading);
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";const a=require("./element-DUJa1sRq.cjs"),e=require("./lit-element-DHqqtYbj.cjs"),x=require("./ref-BMQZJJEo.cjs"),h=require("./icon-RJ9Op-BB.cjs"),u=require("./class-map-dph2jLEp.cjs"),c=require("./state-y-GU-VH8.cjs"),d=require("./stringutils-CkVRq4jP.cjs"),k=require("./input-wrapper-EoSAbU-U.cjs"),w=require("./pkt-slot-controller-BzddBp7z.cjs");var _=Object.defineProperty,f=Object.getOwnPropertyDescriptor,n=(o,p,r,l)=>{for(var t=l>1?void 0:l?f(p,r):p,s=o.length-1,i;s>=0;s--)(i=o[s])&&(t=(l?i(p,r,t):i(t))||t);return l&&t&&_(p,r,t),t};exports.PktHelptext=class extends a.PktElement{constructor(){super(),this.defaultSlot=x.e(),this.forId=d.uuidish(),this.helptext="",this.helptextDropdown="",this.helptextDropdownButton=k.specs.props.helptextDropdownButton.default,this.isHelpTextOpen=!1,this.filledSlots=new Set,this.slotController=new w.PktSlotController(this,this.defaultSlot)}updateSlots(p){this.filledSlots=new Set(p)}render(){const p=()=>{const s=!this.isHelpTextOpen;this.isHelpTextOpen=s,this.dispatchEvent(new CustomEvent("toggleHelpText",{bubbles:!0,detail:{isOpen:s}}))},r=u.e({"pkt-inputwrapper__helptext-container":!0,"pkt-inputwrapper__has-helptext":this.helptext||this.helptextDropdown||this.filledSlots.size>0}),l=()=>this.helptextDropdown?e.x`<div class="pkt-inputwrapper__helptext-expandable">
|
|
2
|
-
<button
|
|
3
|
-
class="pkt-link pkt-link--icon-right pkt-btn pkt-btn--small pkt-btn--tertiary pkt-btn--icon-right"
|
|
4
|
-
type="button"
|
|
5
|
-
@click=${p}
|
|
6
|
-
>
|
|
7
|
-
<pkt-icon
|
|
8
|
-
class="pkt-btn__icon"
|
|
9
|
-
name="${this.isHelpTextOpen?"chevron-thin-up":"chevron-thin-down"}"
|
|
10
|
-
></pkt-icon>
|
|
11
|
-
<span class="pkt-btn__text">${h.o(this.helptextDropdownButton)}</span>
|
|
12
|
-
</button>
|
|
13
|
-
<div
|
|
14
|
-
class="${u.e({"pkt-inputwrapper__helptext":!0,"pkt-inputwrapper__helptext-expandable-open":this.isHelpTextOpen,"pkt-inputwrapper__helptext-expandable-closed":!this.isHelpTextOpen})}"
|
|
15
|
-
>
|
|
16
|
-
${h.o(this.helptextDropdown)}
|
|
17
|
-
</div>
|
|
18
|
-
</div>`:e.E,t=()=>e.x`<div class="${r}">
|
|
19
|
-
<div class="pkt-inputwrapper__helptext" id="${this.forId}-helptext">
|
|
20
|
-
<div class="pkt-contents" ${x.n(this.defaultSlot)} name="helptext"></div>
|
|
21
|
-
${this.helptext&&h.o(this.helptext)}
|
|
22
|
-
</div>
|
|
23
|
-
${l()}
|
|
24
|
-
</div>`;return e.x`${t()}`}};n([e.n({type:String,reflect:!0})],exports.PktHelptext.prototype,"forId",2);n([e.n({type:String})],exports.PktHelptext.prototype,"helptext",2);n([e.n({type:String})],exports.PktHelptext.prototype,"helptextDropdown",2);n([e.n({type:String})],exports.PktHelptext.prototype,"helptextDropdownButton",2);n([c.r()],exports.PktHelptext.prototype,"isHelpTextOpen",2);n([c.r()],exports.PktHelptext.prototype,"filledSlots",2);exports.PktHelptext=n([e.t("pkt-helptext")],exports.PktHelptext);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const i=require("./lit-element-DHqqtYbj.cjs"),g=require("./state-y-GU-VH8.cjs"),v=require("./stringutils-CkVRq4jP.cjs"),r=require("./element-DUJa1sRq.cjs"),b=require("./input-wrapper-EoSAbU-U.cjs");var V=Object.defineProperty,s=(u,t,a,h)=>{for(var n=void 0,l=u.length-1,o;l>=0;l--)(o=u[l])&&(n=o(t,a,n)||n);return n&&V(t,a,n),n};class e extends r.PktElement{constructor(){super(),this.defaultValue=null,this.disabled=!1,this.readonly=!1,this.required=!1,this.max=null,this.maxlength=null,this.min=null,this.minlength=null,this.step=null,this.ariaDescribedBy=null,this.ariaLabelledby=null,this.name="",this.pattern=null,this.placeholder=null,this.id=v.uuidish(),this.counter=!1,this.hasError=!1,this.inline=!1,this.hasFieldset=!1,this.optionalTag=!1,this.requiredTag=!1,this.skipForwardTestid=!1,this.useWrapper=!0,this.fullwidth=!1,this.counterMaxLength=0,this.errorMessage="",this.helptext="",this.helptextDropdown="",this.helptextDropdownButton=b.specs.props.helptextDropdownButton.default,this.label=null,this.optionalText=r.translations.forms.labels.optional,this.requiredText=r.translations.forms.labels.required,this.dataTestid="",this.touched=!1,this.internals=this.attachInternals()}static get formAssociated(){return!0}manageValidity(t){var a,h,n,l,o,p,d,f,c,m,y;t&&(this.required&&!this.value?this.internals.setValidity({valueMissing:!0},r.translations.forms.messages.required,t):(a=t.validity)!=null&&a.typeMismatch||(h=t.validity)!=null&&h.badInput?this.internals.setValidity({typeMismatch:!0},r.translations.forms.messages.invalid,t):(n=t.validity)!=null&&n.patternMismatch?this.internals.setValidity({patternMismatch:!0},r.translations.forms.messages.invalidPattern,t):(l=t.validity)!=null&&l.tooShort||this.minlength&&this.minlength>0&&this.value.length<this.minlength?this.internals.setValidity({tooShort:!0},r.translations.forms.messages.tooShort,t):(o=t.validity)!=null&&o.tooLong||this.maxlength&&this.maxlength>0&&this.value.length>this.maxlength?this.internals.setValidity({tooLong:!0},r.translations.forms.messages.tooLong,t):(p=t.validity)!=null&&p.rangeUnderflow?this.internals.setValidity({rangeUnderflow:!0},this.min?r.translations.forms.messages.rangeUnderflowMin.replace("{min}",(d=this.min)==null?void 0:d.toString()):r.translations.forms.messages.rangeUnderflow,t):(f=t.validity)!=null&&f.stepMismatch?this.internals.setValidity({stepMismatch:!0},r.translations.forms.messages.invalid,t):(c=t.validity)!=null&&c.rangeOverflow?this.internals.setValidity({rangeOverflow:!0},this.max?r.translations.forms.messages.rangeOverflowMax.replace("{max}",(m=this.max)==null?void 0:m.toString()):r.translations.forms.messages.rangeOverflow,t):(y=t.validity)!=null&&y.customError?this.internals.setValidity({customError:!0},t.validationMessage,t):this.internals.setValidity({}))}setFormValue(t){if(this.internals)if(Array.isArray(t)){const a=new FormData;t.forEach(h=>{a.append(this.name,h)}),this.internals.setFormValue(a)}else this.internals.setFormValue(t)}valueChecked(t){if(!this.touched)return;const a=this.internals.form||this.closest("form"),h=a?new FormData(a):null;a&&a.querySelectorAll(`pkt-radiobutton[name="${this.name}"], input[type=radio][name="${this.name}"]`).forEach(n=>{const l=n;l.name===this.name&&l.value!==this.value&&l.checked&&(l.checked=!1)}),typeof t=="string"?(this.checked=t==="true",this.internals.ariaChecked=t==="true"):typeof t=="boolean"&&(this.checked=t,this.internals.ariaChecked=t),this.checked?(this.internals.setFormValue(this.value||"on",this.value||"on"),h&&h.append(this.name,this.value||"on"),this.internals.states.add("--checked")):(this.internals.setFormValue(null,null),h&&h.delete(this.name),this.internals.states.delete("--checked")),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("value-change",{detail:this.checked,bubbles:!0,composed:!0})),this.internals.reportValidity()}valueChanged(t,a){(a!==this.value||a!==this._value)&&(typeof t=="string"?((this.multiple||this.range)&&t.includes(",")&&(t=t.split(",")),this.value=t,this._value=Array.isArray(t)?t:[t]):Array.isArray(t)?(this.value=this.multiple||this.range?t:t[0],this._value=t):(this.value="",this._value=[]),(!this.value||this.value.length===0)&&a&&a.length!==0?this.clearInputValue():this.value&&this.value.toString()!==(a==null?void 0:a.toString())&&this.onChange(this.value),this.updateComplete.then(()=>this.requestUpdate()))}clearInputValue(){const t=this.multiple||this.range?[]:"";this.value=t,this.internals.setFormValue(t),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("value-change",{detail:t,bubbles:!0,composed:!0}))}onFocus(){this.dispatchEvent(new FocusEvent("focus",{bubbles:!0,composed:!0}))}onBlur(){this.dispatchEvent(new FocusEvent("blur",{bubbles:!0,composed:!0}))}onInput(){this.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0}))}onChange(t){if(!this.touched){this.touched=!0,t&&this.setFormValue(t);return}typeof t!="string"&&!Array.isArray(t)||((this.range||this.multiple)&&!Array.isArray(t)&&t.includes(",")&&(t=t.split(",")),!this.multiple&&!this.range&&Array.isArray(t)&&(t=t[0]),this.setFormValue(t),this.manageValidity(this.inputRef.value),this.inputRefTo&&this.manageValidity(this.inputRefTo.value),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("value-change",{detail:t,bubbles:!0,composed:!0})))}formResetCallback(){this.touched=!1,this._options&&this._options.length&&this._options.forEach(t=>{t.selected=!1}),this.checked!==void 0?(this.checked=!1,this.internals.ariaChecked=!1,this.internals.setFormValue("",""),this.inputRef.value.checked=!1,this.valueChecked(this.checked)):(this.internals.setFormValue(""),this.value=this.defaultValue||(this.multiple||this.range?[]:""),this._value=this.value,this.valueChanged(this.value,null)),this.internals.ariaInvalid=!1}updated(t){super.updated(t),t.has("dataTestid")&&this.dataTestid&&this.inputRef.value&&(this.skipForwardTestid?this.hasAttribute("data-testid")||this.setAttribute("data-testid",this.dataTestid):(this.inputRef.value.dataset.testid=this.dataTestid,this.removeAttribute("data-testid")))}firstUpdated(t){if(super.firstUpdated(t),!this.form){const a=this.internals.form||this.closest("form");this.form=a}if(this.value&&this.defaultValue!==null&&(this.defaultValue=this.value),this.defaultValue!==null&&!this.value&&this.valueChanged(this.defaultValue,null),this.defaultChecked&&(this.internals.ariaChecked=!0,this.checked=!0),this.required&&(this.internals.ariaRequired=!0),this.disabled&&(this.internals.ariaDisabled=!0),this.id&&!this.name&&(this.name=this.id),this.checked!==void 0){const a=this.checked===""||this.checked==="true"||this.checked===!0;this.internals.ariaChecked=a,this.internals.setFormValue(a?this.value||"on":"",a?this.value||"on":"")}else this.internals.setFormValue(this.value);this.inputRef&&this.inputRef.value&&(this.inputRef.value.setAttribute("form",""),this.manageValidity(this.inputRef.value)),this.inputRefTo&&this.inputRefTo.value&&(this.inputRefTo.value.setAttribute("form",""),this.manageValidity(this.inputRefTo.value))}}s([i.n()],e.prototype,"defaultValue");s([i.n({type:Boolean,reflect:!0})],e.prototype,"disabled");s([i.n({type:Boolean,reflect:!0})],e.prototype,"readonly");s([i.n({type:Boolean,reflect:!0})],e.prototype,"required");s([i.n({type:Number,reflect:!0})],e.prototype,"max");s([i.n({type:Number,reflect:!0})],e.prototype,"maxlength");s([i.n({type:Number,reflect:!0})],e.prototype,"min");s([i.n({type:Number,reflect:!0})],e.prototype,"minlength");s([i.n({type:Number,reflect:!0})],e.prototype,"step");s([i.n({type:String})],e.prototype,"ariaDescribedBy");s([i.n({type:String})],e.prototype,"ariaLabelledby");s([i.n({type:String,reflect:!0})],e.prototype,"name");s([i.n({type:String,reflect:!0})],e.prototype,"pattern");s([i.n({type:String,reflect:!0})],e.prototype,"placeholder");s([i.n({type:String,reflect:!0})],e.prototype,"id");s([i.n({type:Boolean})],e.prototype,"counter");s([i.n({type:Boolean})],e.prototype,"hasError");s([i.n({type:Boolean})],e.prototype,"inline");s([i.n({type:Boolean})],e.prototype,"hasFieldset");s([i.n({type:Boolean})],e.prototype,"optionalTag");s([i.n({type:Boolean})],e.prototype,"requiredTag");s([i.n({type:Boolean})],e.prototype,"skipForwardTestid");s([i.n({type:Boolean,reflect:!1})],e.prototype,"useWrapper");s([i.n({type:Boolean,reflect:!0})],e.prototype,"fullwidth");s([i.n({type:Number})],e.prototype,"counterMaxLength");s([i.n({type:String})],e.prototype,"errorMessage");s([i.n({type:String})],e.prototype,"helptext");s([i.n({type:String})],e.prototype,"helptextDropdown");s([i.n({type:String,reflect:!1})],e.prototype,"helptextDropdownButton");s([i.n({type:String})],e.prototype,"label");s([i.n({type:String,reflect:!1})],e.prototype,"optionalText");s([i.n({type:String,reflect:!1})],e.prototype,"requiredText");s([i.n({type:String,attribute:"data-testid"})],e.prototype,"dataTestid");s([g.r()],e.prototype,"touched");exports.PktInputElement=e;
|
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
import { n as s } from "./lit-element-DcUrSbRH.js";
|
|
2
|
-
import { r as g } from "./state-P2J1I2ny.js";
|
|
3
|
-
import { u as v } from "./stringutils-DJjRa8dG.js";
|
|
4
|
-
import { P as b, t as a } from "./element-Cfyyg4nF.js";
|
|
5
|
-
import { s as V } from "./input-wrapper-8iKEzDRZ.js";
|
|
6
|
-
var k = Object.defineProperty, e = (u, t, r, n) => {
|
|
7
|
-
for (var l = void 0, h = u.length - 1, o; h >= 0; h--)
|
|
8
|
-
(o = u[h]) && (l = o(t, r, l) || l);
|
|
9
|
-
return l && k(t, r, l), l;
|
|
10
|
-
};
|
|
11
|
-
class i extends b {
|
|
12
|
-
constructor() {
|
|
13
|
-
super(), this.defaultValue = null, this.disabled = !1, this.readonly = !1, this.required = !1, this.max = null, this.maxlength = null, this.min = null, this.minlength = null, this.step = null, this.ariaDescribedBy = null, this.ariaLabelledby = null, this.name = "", this.pattern = null, this.placeholder = null, this.id = v(), this.counter = !1, this.hasError = !1, this.inline = !1, this.hasFieldset = !1, this.optionalTag = !1, this.requiredTag = !1, this.skipForwardTestid = !1, this.useWrapper = !0, this.fullwidth = !1, this.counterMaxLength = 0, this.errorMessage = "", this.helptext = "", this.helptextDropdown = "", this.helptextDropdownButton = V.props.helptextDropdownButton.default, this.label = null, this.optionalText = a.forms.labels.optional, this.requiredText = a.forms.labels.required, this.dataTestid = "", this.touched = !1, this.internals = this.attachInternals();
|
|
14
|
-
}
|
|
15
|
-
static get formAssociated() {
|
|
16
|
-
return !0;
|
|
17
|
-
}
|
|
18
|
-
manageValidity(t) {
|
|
19
|
-
var r, n, l, h, o, p, d, f, c, m, y;
|
|
20
|
-
t && (this.required && !this.value ? this.internals.setValidity({ valueMissing: !0 }, a.forms.messages.required, t) : (r = t.validity) != null && r.typeMismatch || (n = t.validity) != null && n.badInput ? this.internals.setValidity({ typeMismatch: !0 }, a.forms.messages.invalid, t) : (l = t.validity) != null && l.patternMismatch ? this.internals.setValidity(
|
|
21
|
-
{ patternMismatch: !0 },
|
|
22
|
-
a.forms.messages.invalidPattern,
|
|
23
|
-
t
|
|
24
|
-
) : (h = t.validity) != null && h.tooShort || this.minlength && this.minlength > 0 && this.value.length < this.minlength ? this.internals.setValidity({ tooShort: !0 }, a.forms.messages.tooShort, t) : (o = t.validity) != null && o.tooLong || this.maxlength && this.maxlength > 0 && this.value.length > this.maxlength ? this.internals.setValidity({ tooLong: !0 }, a.forms.messages.tooLong, t) : (p = t.validity) != null && p.rangeUnderflow ? this.internals.setValidity(
|
|
25
|
-
{ rangeUnderflow: !0 },
|
|
26
|
-
this.min ? a.forms.messages.rangeUnderflowMin.replace("{min}", (d = this.min) == null ? void 0 : d.toString()) : a.forms.messages.rangeUnderflow,
|
|
27
|
-
t
|
|
28
|
-
) : (f = t.validity) != null && f.stepMismatch ? this.internals.setValidity({ stepMismatch: !0 }, a.forms.messages.invalid, t) : (c = t.validity) != null && c.rangeOverflow ? this.internals.setValidity(
|
|
29
|
-
{ rangeOverflow: !0 },
|
|
30
|
-
this.max ? a.forms.messages.rangeOverflowMax.replace("{max}", (m = this.max) == null ? void 0 : m.toString()) : a.forms.messages.rangeOverflow,
|
|
31
|
-
t
|
|
32
|
-
) : (y = t.validity) != null && y.customError ? this.internals.setValidity({ customError: !0 }, t.validationMessage, t) : this.internals.setValidity({}));
|
|
33
|
-
}
|
|
34
|
-
setFormValue(t) {
|
|
35
|
-
if (this.internals)
|
|
36
|
-
if (Array.isArray(t)) {
|
|
37
|
-
const r = new FormData();
|
|
38
|
-
t.forEach((n) => {
|
|
39
|
-
r.append(this.name, n);
|
|
40
|
-
}), this.internals.setFormValue(r);
|
|
41
|
-
} else
|
|
42
|
-
this.internals.setFormValue(t);
|
|
43
|
-
}
|
|
44
|
-
// Trigger this when you want to set the value of the *radio or checkbox* input out to the form
|
|
45
|
-
// Do not use valueChanged or onChange for radios and checkboxes!
|
|
46
|
-
valueChecked(t) {
|
|
47
|
-
if (!this.touched) return;
|
|
48
|
-
const r = this.internals.form || this.closest("form"), n = r ? new FormData(r) : null;
|
|
49
|
-
r && r.querySelectorAll(
|
|
50
|
-
`pkt-radiobutton[name="${this.name}"], input[type=radio][name="${this.name}"]`
|
|
51
|
-
).forEach((l) => {
|
|
52
|
-
const h = l;
|
|
53
|
-
h.name === this.name && h.value !== this.value && h.checked && (h.checked = !1);
|
|
54
|
-
}), typeof t == "string" ? (this.checked = t === "true", this.internals.ariaChecked = t === "true") : typeof t == "boolean" && (this.checked = t, this.internals.ariaChecked = t), this.checked ? (this.internals.setFormValue(this.value || "on", this.value || "on"), n && n.append(this.name, this.value || "on"), this.internals.states.add("--checked")) : (this.internals.setFormValue(null, null), n && n.delete(this.name), this.internals.states.delete("--checked")), this.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 })), this.dispatchEvent(
|
|
55
|
-
new CustomEvent("value-change", {
|
|
56
|
-
detail: this.checked,
|
|
57
|
-
bubbles: !0,
|
|
58
|
-
composed: !0
|
|
59
|
-
})
|
|
60
|
-
), this.internals.reportValidity();
|
|
61
|
-
}
|
|
62
|
-
valueChanged(t, r) {
|
|
63
|
-
(r !== this.value || r !== this._value) && (typeof t == "string" ? ((this.multiple || this.range) && t.includes(",") && (t = t.split(",")), this.value = t, this._value = Array.isArray(t) ? t : [t]) : Array.isArray(t) ? (this.value = this.multiple || this.range ? t : t[0], this._value = t) : (this.value = "", this._value = []), (!this.value || this.value.length === 0) && r && r.length !== 0 ? this.clearInputValue() : this.value && this.value.toString() !== (r == null ? void 0 : r.toString()) && this.onChange(this.value), this.updateComplete.then(() => this.requestUpdate()));
|
|
64
|
-
}
|
|
65
|
-
// When input goes from content to no content
|
|
66
|
-
clearInputValue() {
|
|
67
|
-
const t = this.multiple || this.range ? [] : "";
|
|
68
|
-
this.value = t, this.internals.setFormValue(t), this.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 })), this.dispatchEvent(
|
|
69
|
-
new CustomEvent("value-change", {
|
|
70
|
-
detail: t,
|
|
71
|
-
bubbles: !0,
|
|
72
|
-
composed: !0
|
|
73
|
-
})
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
// When user enters the input, we need to push that event out to the form
|
|
77
|
-
onFocus() {
|
|
78
|
-
this.dispatchEvent(new FocusEvent("focus", { bubbles: !0, composed: !0 }));
|
|
79
|
-
}
|
|
80
|
-
// And also when the user leaves the input...
|
|
81
|
-
onBlur() {
|
|
82
|
-
this.dispatchEvent(new FocusEvent("blur", { bubbles: !0, composed: !0 }));
|
|
83
|
-
}
|
|
84
|
-
// Trigger this when user types in the input
|
|
85
|
-
onInput() {
|
|
86
|
-
this.dispatchEvent(new InputEvent("input", { bubbles: !0, composed: !0 }));
|
|
87
|
-
}
|
|
88
|
-
// Trigger this when you want to set the value of the input out to the form
|
|
89
|
-
onChange(t) {
|
|
90
|
-
if (!this.touched) {
|
|
91
|
-
this.touched = !0, t && this.setFormValue(t);
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
typeof t != "string" && !Array.isArray(t) || ((this.range || this.multiple) && !Array.isArray(t) && t.includes(",") && (t = t.split(",")), !this.multiple && !this.range && Array.isArray(t) && (t = t[0]), this.setFormValue(t), this.manageValidity(this.inputRef.value), this.inputRefTo && this.manageValidity(this.inputRefTo.value), this.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 })), this.dispatchEvent(
|
|
95
|
-
new CustomEvent("value-change", {
|
|
96
|
-
detail: t,
|
|
97
|
-
bubbles: !0,
|
|
98
|
-
composed: !0
|
|
99
|
-
})
|
|
100
|
-
));
|
|
101
|
-
}
|
|
102
|
-
formResetCallback() {
|
|
103
|
-
this.touched = !1, this._options && this._options.length && this._options.forEach((t) => {
|
|
104
|
-
t.selected = !1;
|
|
105
|
-
}), this.checked !== void 0 ? (this.checked = !1, this.internals.ariaChecked = !1, this.internals.setFormValue("", ""), this.inputRef.value.checked = !1, this.valueChecked(this.checked)) : (this.internals.setFormValue(""), this.value = this.defaultValue || (this.multiple || this.range ? [] : ""), this._value = this.value, this.valueChanged(this.value, null)), this.internals.ariaInvalid = !1;
|
|
106
|
-
}
|
|
107
|
-
updated(t) {
|
|
108
|
-
super.updated(t), t.has("dataTestid") && this.dataTestid && this.inputRef.value && (this.skipForwardTestid ? this.hasAttribute("data-testid") || this.setAttribute("data-testid", this.dataTestid) : (this.inputRef.value.dataset.testid = this.dataTestid, this.removeAttribute("data-testid")));
|
|
109
|
-
}
|
|
110
|
-
firstUpdated(t) {
|
|
111
|
-
if (super.firstUpdated(t), !this.form) {
|
|
112
|
-
const r = this.internals.form || this.closest("form");
|
|
113
|
-
this.form = r;
|
|
114
|
-
}
|
|
115
|
-
if (this.value && this.defaultValue !== null && (this.defaultValue = this.value), this.defaultValue !== null && !this.value && this.valueChanged(this.defaultValue, null), this.defaultChecked && (this.internals.ariaChecked = !0, this.checked = !0), this.required && (this.internals.ariaRequired = !0), this.disabled && (this.internals.ariaDisabled = !0), this.id && !this.name && (this.name = this.id), this.checked !== void 0) {
|
|
116
|
-
const r = this.checked === "" || this.checked === "true" || this.checked === !0;
|
|
117
|
-
this.internals.ariaChecked = r, this.internals.setFormValue(
|
|
118
|
-
r ? this.value || "on" : "",
|
|
119
|
-
r ? this.value || "on" : ""
|
|
120
|
-
);
|
|
121
|
-
} else
|
|
122
|
-
this.internals.setFormValue(this.value);
|
|
123
|
-
this.inputRef && this.inputRef.value && (this.inputRef.value.setAttribute("form", ""), this.manageValidity(this.inputRef.value)), this.inputRefTo && this.inputRefTo.value && (this.inputRefTo.value.setAttribute("form", ""), this.manageValidity(this.inputRefTo.value));
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
e([
|
|
127
|
-
s()
|
|
128
|
-
], i.prototype, "defaultValue");
|
|
129
|
-
e([
|
|
130
|
-
s({ type: Boolean, reflect: !0 })
|
|
131
|
-
], i.prototype, "disabled");
|
|
132
|
-
e([
|
|
133
|
-
s({ type: Boolean, reflect: !0 })
|
|
134
|
-
], i.prototype, "readonly");
|
|
135
|
-
e([
|
|
136
|
-
s({ type: Boolean, reflect: !0 })
|
|
137
|
-
], i.prototype, "required");
|
|
138
|
-
e([
|
|
139
|
-
s({ type: Number, reflect: !0 })
|
|
140
|
-
], i.prototype, "max");
|
|
141
|
-
e([
|
|
142
|
-
s({ type: Number, reflect: !0 })
|
|
143
|
-
], i.prototype, "maxlength");
|
|
144
|
-
e([
|
|
145
|
-
s({ type: Number, reflect: !0 })
|
|
146
|
-
], i.prototype, "min");
|
|
147
|
-
e([
|
|
148
|
-
s({ type: Number, reflect: !0 })
|
|
149
|
-
], i.prototype, "minlength");
|
|
150
|
-
e([
|
|
151
|
-
s({ type: Number, reflect: !0 })
|
|
152
|
-
], i.prototype, "step");
|
|
153
|
-
e([
|
|
154
|
-
s({ type: String })
|
|
155
|
-
], i.prototype, "ariaDescribedBy");
|
|
156
|
-
e([
|
|
157
|
-
s({ type: String })
|
|
158
|
-
], i.prototype, "ariaLabelledby");
|
|
159
|
-
e([
|
|
160
|
-
s({ type: String, reflect: !0 })
|
|
161
|
-
], i.prototype, "name");
|
|
162
|
-
e([
|
|
163
|
-
s({ type: String, reflect: !0 })
|
|
164
|
-
], i.prototype, "pattern");
|
|
165
|
-
e([
|
|
166
|
-
s({ type: String, reflect: !0 })
|
|
167
|
-
], i.prototype, "placeholder");
|
|
168
|
-
e([
|
|
169
|
-
s({ type: String, reflect: !0 })
|
|
170
|
-
], i.prototype, "id");
|
|
171
|
-
e([
|
|
172
|
-
s({ type: Boolean })
|
|
173
|
-
], i.prototype, "counter");
|
|
174
|
-
e([
|
|
175
|
-
s({ type: Boolean })
|
|
176
|
-
], i.prototype, "hasError");
|
|
177
|
-
e([
|
|
178
|
-
s({ type: Boolean })
|
|
179
|
-
], i.prototype, "inline");
|
|
180
|
-
e([
|
|
181
|
-
s({ type: Boolean })
|
|
182
|
-
], i.prototype, "hasFieldset");
|
|
183
|
-
e([
|
|
184
|
-
s({ type: Boolean })
|
|
185
|
-
], i.prototype, "optionalTag");
|
|
186
|
-
e([
|
|
187
|
-
s({ type: Boolean })
|
|
188
|
-
], i.prototype, "requiredTag");
|
|
189
|
-
e([
|
|
190
|
-
s({ type: Boolean })
|
|
191
|
-
], i.prototype, "skipForwardTestid");
|
|
192
|
-
e([
|
|
193
|
-
s({ type: Boolean, reflect: !1 })
|
|
194
|
-
], i.prototype, "useWrapper");
|
|
195
|
-
e([
|
|
196
|
-
s({ type: Boolean, reflect: !0 })
|
|
197
|
-
], i.prototype, "fullwidth");
|
|
198
|
-
e([
|
|
199
|
-
s({ type: Number })
|
|
200
|
-
], i.prototype, "counterMaxLength");
|
|
201
|
-
e([
|
|
202
|
-
s({ type: String })
|
|
203
|
-
], i.prototype, "errorMessage");
|
|
204
|
-
e([
|
|
205
|
-
s({ type: String })
|
|
206
|
-
], i.prototype, "helptext");
|
|
207
|
-
e([
|
|
208
|
-
s({ type: String })
|
|
209
|
-
], i.prototype, "helptextDropdown");
|
|
210
|
-
e([
|
|
211
|
-
s({ type: String, reflect: !1 })
|
|
212
|
-
], i.prototype, "helptextDropdownButton");
|
|
213
|
-
e([
|
|
214
|
-
s({ type: String })
|
|
215
|
-
], i.prototype, "label");
|
|
216
|
-
e([
|
|
217
|
-
s({ type: String, reflect: !1 })
|
|
218
|
-
], i.prototype, "optionalText");
|
|
219
|
-
e([
|
|
220
|
-
s({ type: String, reflect: !1 })
|
|
221
|
-
], i.prototype, "requiredText");
|
|
222
|
-
e([
|
|
223
|
-
s({ type: String, attribute: "data-testid" })
|
|
224
|
-
], i.prototype, "dataTestid");
|
|
225
|
-
e([
|
|
226
|
-
g()
|
|
227
|
-
], i.prototype, "touched");
|
|
228
|
-
export {
|
|
229
|
-
i as P
|
|
230
|
-
};
|
package/dist/link-Dhs4dS0S.cjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";const f=require("./element-DUJa1sRq.cjs"),h=require("./pkt-slot-controller-BzddBp7z.cjs"),c=require("./ref-BMQZJJEo.cjs"),t=require("./lit-element-DHqqtYbj.cjs"),k=require("./class-map-dph2jLEp.cjs");require("./icon-RJ9Op-BB.cjs");const u={href:{default:"#"},target:{default:"_self"},external:{default:!1}},a={props:u};var P=Object.defineProperty,g=Object.getOwnPropertyDescriptor,n=(o,r,s,i)=>{for(var e=i>1?void 0:i?g(r,s):r,l=o.length-1,p;l>=0;l--)(p=o[l])&&(e=(i?p(r,s,e):p(e))||e);return i&&e&&P(r,s,e),e};exports.PktLink=class extends f.PktElement{constructor(){super(),this.defaultSlot=c.e(),this.href=a.props.href.default,this.iconName=void 0,this.iconPosition=void 0,this.external=a.props.external.default,this.target=a.props.target.default,this.slotController=new h.PktSlotController(this,this.defaultSlot)}render(){const r={"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};return t.x`<a
|
|
2
|
-
class=${k.e(r)}
|
|
3
|
-
href=${this.href}
|
|
4
|
-
.target=${this.target}
|
|
5
|
-
.rel=${this.external?"noopener noreferrer":t.E}
|
|
6
|
-
>${this.iconName?t.x`<pkt-icon name=${this.iconName} class="pkt-link__icon"></pkt-icon>`:""} <span ${c.n(this.defaultSlot)}>Link</span></a
|
|
7
|
-
>`}};n([t.n({type:String,reflect:!0})],exports.PktLink.prototype,"href",2);n([t.n({type:String,reflect:!0})],exports.PktLink.prototype,"iconName",2);n([t.n({type:String,reflect:!0})],exports.PktLink.prototype,"iconPosition",2);n([t.n({type:Boolean,reflect:!0})],exports.PktLink.prototype,"external",2);n([t.n({type:String,reflect:!0})],exports.PktLink.prototype,"target",2);exports.PktLink=n([t.t("pkt-link")],exports.PktLink);
|
|
@@ -1,27 +0,0 @@
|
|
|
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;
|