@oslokommune/punkt-elements 13.18.1 → 13.18.3

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.
Files changed (50) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/{card-Cf-UcGAP.cjs → card-Byrpi1pD.cjs} +1 -1
  3. package/dist/{card-M1X36b6i.js → card-D-tsyQx5.js} +1 -1
  4. package/dist/{checkbox-CqoOG2KJ.cjs → checkbox-BP5zOlPy.cjs} +1 -1
  5. package/dist/{checkbox-CCmRUWTH.js → checkbox-CfXOh6Lw.js} +1 -1
  6. package/dist/{combobox-CtHgl1n2.js → combobox-BK9xei07.js} +3 -3
  7. package/dist/{combobox-6WP1urZS.cjs → combobox-DMBUiR8Z.cjs} +2 -2
  8. package/dist/{datepicker-DEO1C69C.cjs → datepicker-C1Virx9Z.cjs} +2 -2
  9. package/dist/{datepicker-q9haFM81.js → datepicker-p2LxVkLS.js} +3 -3
  10. package/dist/index.d.ts +4 -2
  11. package/dist/{input-element-Dqu8udwd.js → input-element-B0VPRK_E.js} +91 -83
  12. package/dist/input-element-BmXkhljw.cjs +1 -0
  13. package/dist/pkt-card.cjs +1 -1
  14. package/dist/pkt-card.js +1 -1
  15. package/dist/pkt-checkbox.cjs +1 -1
  16. package/dist/pkt-checkbox.js +1 -1
  17. package/dist/pkt-combobox.cjs +1 -1
  18. package/dist/pkt-combobox.js +1 -1
  19. package/dist/pkt-datepicker.cjs +1 -1
  20. package/dist/pkt-datepicker.js +2 -2
  21. package/dist/pkt-index.cjs +1 -1
  22. package/dist/pkt-index.js +9 -9
  23. package/dist/pkt-radiobutton.cjs +1 -1
  24. package/dist/pkt-radiobutton.js +1 -1
  25. package/dist/pkt-select.cjs +1 -1
  26. package/dist/pkt-select.js +1 -1
  27. package/dist/pkt-tag.cjs +1 -1
  28. package/dist/pkt-tag.js +1 -1
  29. package/dist/pkt-textarea.cjs +1 -1
  30. package/dist/pkt-textarea.js +1 -1
  31. package/dist/pkt-textinput.cjs +1 -1
  32. package/dist/pkt-textinput.js +1 -1
  33. package/dist/{radiobutton-FwxpKELo.cjs → radiobutton-BuKXgQm_.cjs} +1 -1
  34. package/dist/{radiobutton-DuAo3CdN.js → radiobutton-C_MzK8dE.js} +1 -1
  35. package/dist/{select-wak-jukY.js → select-BHEtNwcz.js} +2 -2
  36. package/dist/{select-BbmLn1qh.cjs → select-BWnw7CJy.cjs} +2 -2
  37. package/dist/{tag-EFUKrc8q.cjs → tag-CWj979b6.cjs} +5 -5
  38. package/dist/{tag-CqMgt01I.js → tag-DDfymBgc.js} +13 -13
  39. package/dist/{textarea-CzN0E0TV.cjs → textarea-BC962syN.cjs} +2 -2
  40. package/dist/{textarea-CIb4VWtN.js → textarea-O0r9TzqP.js} +2 -2
  41. package/dist/{textinput-D5_RTkRY.js → textinput-COK0LcXj.js} +2 -2
  42. package/dist/{textinput-D8v6D6ie.cjs → textinput-DdcR7OZ-.cjs} +2 -2
  43. package/package.json +2 -2
  44. package/src/components/combobox/combobox.ts +1 -1
  45. package/src/components/datepicker/datepicker.ts +1 -1
  46. package/src/components/select/select.ts +1 -1
  47. package/src/components/tag/tag.ts +2 -2
  48. package/src/components/textarea/textarea.ts +1 -1
  49. package/src/components/textinput/textinput.ts +1 -1
  50. package/dist/input-element-KUsQQ-1d.cjs +0 -1
@@ -0,0 +1 @@
1
+ "use strict";const r=require("./element-CJ_QKaki.cjs"),Vt=require("./state-DSjcvzDN.cjs"),Ct=require("./utils-byXsEz1u.cjs"),Ft=require("./input-wrapper-EoSAbU-U.cjs");var nt={},ot;function Tt(){return ot||(ot=1,(function(){(function(f){const s=new WeakMap,u=new WeakMap,m=new WeakMap,h=new WeakMap,g=new WeakMap,k=new WeakMap,C=new WeakMap,b=new WeakMap,F=new WeakMap,V=new WeakMap,T=new WeakMap,A=new WeakMap,$=new WeakMap,U=new WeakMap,x=new WeakMap,I={ariaAtomic:"aria-atomic",ariaAutoComplete:"aria-autocomplete",ariaBusy:"aria-busy",ariaChecked:"aria-checked",ariaColCount:"aria-colcount",ariaColIndex:"aria-colindex",ariaColIndexText:"aria-colindextext",ariaColSpan:"aria-colspan",ariaCurrent:"aria-current",ariaDescription:"aria-description",ariaDisabled:"aria-disabled",ariaExpanded:"aria-expanded",ariaHasPopup:"aria-haspopup",ariaHidden:"aria-hidden",ariaInvalid:"aria-invalid",ariaKeyShortcuts:"aria-keyshortcuts",ariaLabel:"aria-label",ariaLevel:"aria-level",ariaLive:"aria-live",ariaModal:"aria-modal",ariaMultiLine:"aria-multiline",ariaMultiSelectable:"aria-multiselectable",ariaOrientation:"aria-orientation",ariaPlaceholder:"aria-placeholder",ariaPosInSet:"aria-posinset",ariaPressed:"aria-pressed",ariaReadOnly:"aria-readonly",ariaRelevant:"aria-relevant",ariaRequired:"aria-required",ariaRoleDescription:"aria-roledescription",ariaRowCount:"aria-rowcount",ariaRowIndex:"aria-rowindex",ariaRowIndexText:"aria-rowindextext",ariaRowSpan:"aria-rowspan",ariaSelected:"aria-selected",ariaSetSize:"aria-setsize",ariaSort:"aria-sort",ariaValueMax:"aria-valuemax",ariaValueMin:"aria-valuemin",ariaValueNow:"aria-valuenow",ariaValueText:"aria-valuetext",role:"role"},lt=(e,t)=>{for(let i in I){t[i]=null;let a=null;const n=I[i];Object.defineProperty(t,i,{get(){return a},set(o){a=o,e.isConnected?M(e,n,o):V.set(e,t)}})}};function z(e){const t=h.get(e),{form:i}=t;X(e,i,t),Q(e,t.labels)}const K=(e,t=!1)=>{const i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(o){return h.has(o)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});let a=i.nextNode();const n=!t||e.disabled;for(;a;)a.formDisabledCallback&&n&&W(a,e.disabled),a=i.nextNode()},j={attributes:!0,attributeFilter:["disabled","name"]},L=O()?new MutationObserver(e=>{for(const t of e){const i=t.target;if(t.attributeName==="disabled"&&(i.constructor.formAssociated?W(i,i.hasAttribute("disabled")):i.localName==="fieldset"&&K(i)),t.attributeName==="name"&&i.constructor.formAssociated){const a=h.get(i),n=F.get(i);a.setFormValue(n)}}}):{};function D(e){e.forEach(t=>{const{addedNodes:i,removedNodes:a}=t,n=Array.from(i),o=Array.from(a);n.forEach(l=>{var y;if(h.has(l)&&l.constructor.formAssociated&&z(l),V.has(l)){const p=V.get(l);Object.keys(I).filter(v=>p[v]!==null).forEach(v=>{M(l,I[v],p[v])}),V.delete(l)}if(x.has(l)){const p=x.get(l);M(l,"internals-valid",p.validity.valid.toString()),M(l,"internals-invalid",(!p.validity.valid).toString()),M(l,"aria-invalid",(!p.validity.valid).toString()),x.delete(l)}if(l.localName==="form"){const p=b.get(l),E=document.createTreeWalker(l,NodeFilter.SHOW_ELEMENT,{acceptNode(_){return h.has(_)&&_.constructor.formAssociated&&!(p&&p.has(_))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});let v=E.nextNode();for(;v;)z(v),v=E.nextNode()}l.localName==="fieldset"&&((y=L.observe)===null||y===void 0||y.call(L,l,j),K(l,!0))}),o.forEach(l=>{const y=h.get(l);y&&m.get(y)&&G(y),C.has(l)&&C.get(l).disconnect()})})}function ct(e){e.forEach(t=>{const{removedNodes:i}=t;i.forEach(a=>{const n=$.get(t.target);h.has(a)&&Z(a),n.disconnect()})})}const dt=e=>{var t,i;const a=new MutationObserver(ct);!((t=window==null?void 0:window.ShadyDOM)===null||t===void 0)&&t.inUse&&e.mode&&e.host&&(e=e.host),(i=a.observe)===null||i===void 0||i.call(a,e,{childList:!0}),$.set(e,a)};O()&&new MutationObserver(D);const P={childList:!0,subtree:!0},M=(e,t,i)=>{e.getAttribute(t)!==i&&e.setAttribute(t,i)},W=(e,t)=>{e.toggleAttribute("internals-disabled",t),t?M(e,"aria-disabled","true"):e.removeAttribute("aria-disabled"),e.formDisabledCallback&&e.formDisabledCallback.apply(e,[t])},G=e=>{m.get(e).forEach(i=>{i.remove()}),m.set(e,[])},J=(e,t)=>{const i=document.createElement("input");return i.type="hidden",i.name=e.getAttribute("name"),e.after(i),m.get(t).push(i),i},ut=(e,t)=>{var i;m.set(t,[]),(i=L.observe)===null||i===void 0||i.call(L,e,j)},Q=(e,t)=>{if(t.length){Array.from(t).forEach(a=>a.addEventListener("click",e.click.bind(e)));let i=t[0].id;t[0].id||(i=`${t[0].htmlFor}_Label`,t[0].id=i),M(e,"aria-labelledby",i)}},N=e=>{const t=Array.from(e.elements).filter(o=>!o.tagName.includes("-")&&o.validity).map(o=>o.validity.valid),i=b.get(e)||[],a=Array.from(i).filter(o=>o.isConnected).map(o=>h.get(o).validity.valid),n=[...t,...a].includes(!1);e.toggleAttribute("internals-invalid",n),e.toggleAttribute("internals-valid",!n)},ht=e=>{N(R(e.target))},ft=e=>{N(R(e.target))},pt=e=>{const t=["button[type=submit]","input[type=submit]","button:not([type])"].map(i=>`${i}:not([disabled])`).map(i=>`${i}:not([form])${e.id?`,${i}[form='${e.id}']`:""}`).join(",");e.addEventListener("click",i=>{if(i.target.closest(t)){const n=b.get(e);if(e.noValidate)return;n.size&&Array.from(n).reverse().map(y=>h.get(y).reportValidity()).includes(!1)&&i.preventDefault()}})},mt=e=>{const t=b.get(e.target);t&&t.size&&t.forEach(i=>{i.constructor.formAssociated&&i.formResetCallback&&i.formResetCallback.apply(i)})},X=(e,t,i)=>{if(t){const a=b.get(t);if(a)a.add(e);else{const n=new Set;n.add(e),b.set(t,n),pt(t),t.addEventListener("reset",mt),t.addEventListener("input",ht),t.addEventListener("change",ft)}k.set(t,{ref:e,internals:i}),e.constructor.formAssociated&&e.formAssociatedCallback&&setTimeout(()=>{e.formAssociatedCallback.apply(e,[t])},0),N(t)}},R=e=>{let t=e.parentNode;return t&&t.tagName!=="FORM"&&(t=R(t)),t},w=(e,t,i=DOMException)=>{if(!e.constructor.formAssociated)throw new i(t)},Y=(e,t,i)=>{const a=b.get(e);return a&&a.size&&a.forEach(n=>{h.get(n)[i]()||(t=!1)}),t},Z=e=>{if(e.constructor.formAssociated){const t=h.get(e),{labels:i,form:a}=t;Q(e,i),X(e,a,t)}};function O(){return typeof MutationObserver<"u"}class yt{constructor(){this.badInput=!1,this.customError=!1,this.patternMismatch=!1,this.rangeOverflow=!1,this.rangeUnderflow=!1,this.stepMismatch=!1,this.tooLong=!1,this.tooShort=!1,this.typeMismatch=!1,this.valid=!0,this.valueMissing=!1,Object.seal(this)}}const gt=e=>(e.badInput=!1,e.customError=!1,e.patternMismatch=!1,e.rangeOverflow=!1,e.rangeUnderflow=!1,e.stepMismatch=!1,e.tooLong=!1,e.tooShort=!1,e.typeMismatch=!1,e.valid=!0,e.valueMissing=!1,e),bt=(e,t,i)=>(e.valid=vt(t),Object.keys(t).forEach(a=>e[a]=t[a]),i&&N(i),e),vt=e=>{let t=!0;for(let i in e)i!=="valid"&&e[i]!==!1&&(t=!1);return t},H=new WeakMap;function tt(e,t){e.toggleAttribute(t,!0),e.part&&e.part.add(t)}class q extends Set{static get isPolyfilled(){return!0}constructor(t){if(super(),!t||!t.tagName||t.tagName.indexOf("-")===-1)throw new TypeError("Illegal constructor");H.set(this,t)}add(t){if(!/^--/.test(t)||typeof t!="string")throw new DOMException(`Failed to execute 'add' on 'CustomStateSet': The specified value ${t} must start with '--'.`);const i=super.add(t),a=H.get(this),n=`state${t}`;return a.isConnected?tt(a,n):setTimeout(()=>{tt(a,n)}),i}clear(){for(let[t]of this.entries())this.delete(t);super.clear()}delete(t){const i=super.delete(t),a=H.get(this);return a.isConnected?(a.toggleAttribute(`state${t}`,!1),a.part&&a.part.remove(`state${t}`)):setTimeout(()=>{a.toggleAttribute(`state${t}`,!1),a.part&&a.part.remove(`state${t}`)}),i}}function et(e,t,i,a){if(typeof t=="function"?e!==t||!a:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?a:i==="a"?a.call(e):a?a.value:t.get(e)}function wt(e,t,i,a,n){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,i),i}var S;class Et{constructor(t){S.set(this,void 0),wt(this,S,t);for(let i=0;i<t.length;i++){let a=t[i];this[i]=a,a.hasAttribute("name")&&(this[a.getAttribute("name")]=a)}Object.freeze(this)}get length(){return et(this,S,"f").length}[(S=new WeakMap,Symbol.iterator)](){return et(this,S,"f")[Symbol.iterator]()}item(t){return this[t]==null?null:this[t]}namedItem(t){return this[t]==null?null:this[t]}}function Mt(){const e=HTMLFormElement.prototype.checkValidity;HTMLFormElement.prototype.checkValidity=i;const t=HTMLFormElement.prototype.reportValidity;HTMLFormElement.prototype.reportValidity=a;function i(...o){let l=e.apply(this,o);return Y(this,l,"checkValidity")}function a(...o){let l=t.apply(this,o);return Y(this,l,"reportValidity")}const{get:n}=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get(...o){const l=n.call(this,...o),y=Array.from(b.get(this)||[]);if(y.length===0)return l;const p=Array.from(l).concat(y).sort((E,v)=>E.compareDocumentPosition?E.compareDocumentPosition(v)&2?1:-1:0);return new Et(p)}})}class it{static get isPolyfilled(){return!0}constructor(t){if(!t||!t.tagName||t.tagName.indexOf("-")===-1)throw new TypeError("Illegal constructor");const i=t.getRootNode(),a=new yt;this.states=new q(t),s.set(this,t),u.set(this,a),h.set(t,this),lt(t,this),ut(t,this),Object.seal(this),i instanceof DocumentFragment&&dt(i)}checkValidity(){const t=s.get(this);if(w(t,"Failed to execute 'checkValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const i=u.get(this);if(!i.valid){const a=new Event("invalid",{bubbles:!1,cancelable:!0,composed:!1});t.dispatchEvent(a)}return i.valid}get form(){const t=s.get(this);w(t,"Failed to read the 'form' property from 'ElementInternals': The target element is not a form-associated custom element.");let i;return t.constructor.formAssociated===!0&&(i=R(t)),i}get labels(){const t=s.get(this);w(t,"Failed to read the 'labels' property from 'ElementInternals': The target element is not a form-associated custom element.");const i=t.getAttribute("id"),a=t.getRootNode();return a&&i?a.querySelectorAll(`[for="${i}"]`):[]}reportValidity(){const t=s.get(this);if(w(t,"Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const i=this.checkValidity(),a=A.get(this);if(a&&!t.constructor.formAssociated)throw new DOMException("Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.");return!i&&a&&(t.focus(),a.focus()),i}setFormValue(t){const i=s.get(this);if(w(i,"Failed to execute 'setFormValue' on 'ElementInternals': The target element is not a form-associated custom element."),G(this),t!=null&&!(t instanceof FormData)){if(i.getAttribute("name")){const a=J(i,this);a.value=t}}else t!=null&&t instanceof FormData&&Array.from(t).reverse().forEach(([a,n])=>{if(typeof n=="string"){const o=J(i,this);o.name=a,o.value=n}});F.set(i,t)}setValidity(t,i,a){const n=s.get(this);if(w(n,"Failed to execute 'setValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!t)throw new TypeError("Failed to execute 'setValidity' on 'ElementInternals': 1 argument required, but only 0 present.");A.set(this,a);const o=u.get(this),l={};for(const E in t)l[E]=t[E];Object.keys(l).length===0&&gt(o);const y=Object.assign(Object.assign({},o),l);delete y.valid;const{valid:p}=bt(o,y,this.form);if(!p&&!i)throw new DOMException("Failed to execute 'setValidity' on 'ElementInternals': The second argument should not be empty if one or more flags in the first argument are true.");g.set(this,p?"":i),n.isConnected?(n.toggleAttribute("internals-invalid",!p),n.toggleAttribute("internals-valid",p),M(n,"aria-invalid",`${!p}`)):x.set(n,this)}get shadowRoot(){const t=s.get(this),i=T.get(t);return i||null}get validationMessage(){const t=s.get(this);return w(t,"Failed to read the 'validationMessage' property from 'ElementInternals': The target element is not a form-associated custom element."),g.get(this)}get validity(){const t=s.get(this);return w(t,"Failed to read the 'validity' property from 'ElementInternals': The target element is not a form-associated custom element."),u.get(this)}get willValidate(){const t=s.get(this);return w(t,"Failed to read the 'willValidate' property from 'ElementInternals': The target element is not a form-associated custom element."),!(t.disabled||t.hasAttribute("disabled")||t.hasAttribute("readonly"))}}function kt(){if(typeof window>"u"||!window.ElementInternals||!HTMLElement.prototype.attachInternals)return!1;class e extends HTMLElement{constructor(){super(),this.internals=this.attachInternals()}}const t=`element-internals-feature-detection-${Math.random().toString(36).replace(/[^a-z]+/g,"")}`;customElements.define(t,e);const i=new e;return["shadowRoot","form","willValidate","validity","validationMessage","labels","setFormValue","setValidity","checkValidity","reportValidity"].every(a=>a in i.internals)}let at=!1,st=!1;function B(e){st||(st=!0,window.CustomStateSet=q,e&&(HTMLElement.prototype.attachInternals=function(...t){const i=e.call(this,t);return i.states=new q(this),i}))}function rt(e=!0){if(!at){if(at=!0,typeof window<"u"&&(window.ElementInternals=it),typeof CustomElementRegistry<"u"){const t=CustomElementRegistry.prototype.define;CustomElementRegistry.prototype.define=function(i,a,n){if(a.formAssociated){const o=a.prototype.connectedCallback;a.prototype.connectedCallback=function(){U.has(this)||(U.set(this,!0),this.hasAttribute("disabled")&&W(this,!0)),o!=null&&o.apply(this),Z(this)}}t.call(this,i,a,n)}}if(typeof HTMLElement<"u"&&(HTMLElement.prototype.attachInternals=function(){if(this.tagName){if(this.tagName.indexOf("-")===-1)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': Unable to attach ElementInternals to non-custom elements.")}else return{};if(h.has(this))throw new DOMException("DOMException: Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");return new it(this)}),typeof Element<"u"){let t=function(...a){const n=i.apply(this,a);if(T.set(this,n),O()){const o=new MutationObserver(D);window.ShadyDOM?o.observe(this,P):o.observe(n,P),C.set(this,o)}return n};const i=Element.prototype.attachShadow;Element.prototype.attachShadow=t}O()&&typeof document<"u"&&new MutationObserver(D).observe(document.documentElement,P),typeof HTMLFormElement<"u"&&Mt(),(e||typeof window<"u"&&!window.CustomStateSet)&&B()}}return!!customElements.polyfillWrapFlushCallback||(kt()?typeof window<"u"&&!window.CustomStateSet&&B(HTMLElement.prototype.attachInternals):rt(!1)),f.forceCustomStateSetPolyfill=B,f.forceElementInternalsPolyfill=rt,Object.defineProperty(f,"__esModule",{value:!0}),f})({})})()),nt}Tt();var At=Object.defineProperty,d=(f,s,u,m)=>{for(var h=void 0,g=f.length-1,k;g>=0;g--)(k=f[g])&&(h=k(s,u,h)||h);return h&&At(s,u,h),h};const St={fromAttribute(f){return f==null?!1:f===""||f==="true"||f===!0?!0:f==="false"||f===!1?!1:!!f},toAttribute(f){return f?"true":"false"}};class c 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=Ct.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=Ft.specs.props.helptextDropdownButton.default,this.label=null,this.optionalText=r.translations.forms.labels.optional,this.requiredText=r.translations.forms.labels.required,this.tagText=null,this.dataTestid="",this.touched=!1,this.internals=this.attachInternals()}static get formAssociated(){return!0}manageValidity(s){var u,m,h,g,k,C,b,F,V,T,A;s&&(this.required&&!this.value?this.internals.setValidity({valueMissing:!0},r.translations.forms.messages.required,s):(u=s.validity)!=null&&u.typeMismatch||(m=s.validity)!=null&&m.badInput?this.internals.setValidity({typeMismatch:!0},r.translations.forms.messages.invalid,s):(h=s.validity)!=null&&h.patternMismatch?this.internals.setValidity({patternMismatch:!0},r.translations.forms.messages.invalidPattern,s):(g=s.validity)!=null&&g.tooShort||this.minlength&&this.minlength>0&&this.value.length<this.minlength?this.internals.setValidity({tooShort:!0},r.translations.forms.messages.tooShort,s):(k=s.validity)!=null&&k.tooLong||this.maxlength&&this.maxlength>0&&this.value.length>this.maxlength?this.internals.setValidity({tooLong:!0},r.translations.forms.messages.tooLong,s):(C=s.validity)!=null&&C.rangeUnderflow?this.internals.setValidity({rangeUnderflow:!0},this.min?r.translations.forms.messages.rangeUnderflowMin.replace("{min}",(b=this.min)==null?void 0:b.toString()):r.translations.forms.messages.rangeUnderflow,s):(F=s.validity)!=null&&F.stepMismatch?this.internals.setValidity({stepMismatch:!0},r.translations.forms.messages.invalid,s):(V=s.validity)!=null&&V.rangeOverflow?this.internals.setValidity({rangeOverflow:!0},this.max?r.translations.forms.messages.rangeOverflowMax.replace("{max}",(T=this.max)==null?void 0:T.toString()):r.translations.forms.messages.rangeOverflow,s):(A=s.validity)!=null&&A.customError?this.internals.setValidity({customError:!0},s.validationMessage,s):this.internals.setValidity({}))}setFormValue(s){if(this.internals)if(Array.isArray(s)){const u=new FormData;s.forEach(m=>{u.append(this.name,m)}),this.internals.setFormValue(u)}else this.internals.setFormValue(s)}valueChecked(s){if(!this.touched)return;const u=this.internals.form||this.closest("form"),m=u?new FormData(u):null;u&&u.querySelectorAll(`pkt-radiobutton[name="${this.name}"], input[type=radio][name="${this.name}"]`).forEach(h=>{const g=h;g.name===this.name&&g.value!==this.value&&g.checked&&(g.checked=!1)}),typeof s=="string"?(this.checked=s==="true",this.internals.ariaChecked=s==="true"):typeof s=="boolean"&&(this.checked=s,this.internals.ariaChecked=s),this.checked?(this.internals.setFormValue(this.value||"on",this.value||"on"),m&&m.append(this.name,this.value||"on"),this.internals.states.add("--checked")):(this.internals.setFormValue(null,null),m&&m.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(s,u){(u!==this.value||u!==this._value)&&(typeof s=="string"?((this.multiple||this.range)&&s.includes(",")&&(s=s.split(",")),this.value=s,this._value=Array.isArray(s)?s:[s]):Array.isArray(s)?(this.value=this.multiple||this.range?s:s[0],this._value=s):(this.value="",this._value=[]),(!this.value||this.value.length===0)&&u&&u.length!==0?this.clearInputValue():this.value&&this.value.toString()!==(u==null?void 0:u.toString())&&this.onChange(this.value),this.updateComplete.then(()=>this.requestUpdate()))}clearInputValue(){const s=this.multiple||this.range?[]:"";this.value=s,this.internals.setFormValue(s),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("value-change",{detail:s,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(s){if(!this.touched){this.touched=!0,s&&this.setFormValue(s);return}typeof s!="string"&&!Array.isArray(s)||((this.range||this.multiple)&&!Array.isArray(s)&&s.includes(",")&&(s=s.split(",")),!this.multiple&&!this.range&&Array.isArray(s)&&(s=s[0]),this.setFormValue(s),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:s,bubbles:!0,composed:!0})))}formResetCallback(){this.touched=!1,this._options&&this._options.length&&this._options.forEach(s=>{"selected"in s&&(s.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(s){super.updated(s),s.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(s){if(super.firstUpdated(s),!this.form){const u=this.internals.form||this.closest("form");this.form=u}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 u=this.checked===""||this.checked==="true"||this.checked===!0;this.internals.ariaChecked=u,this.internals.setFormValue(u?this.value||"on":"",u?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))}}d([r.n()],c.prototype,"defaultValue");d([r.n({type:Boolean,reflect:!0})],c.prototype,"disabled");d([r.n({type:Boolean,reflect:!0})],c.prototype,"readonly");d([r.n({type:Boolean,reflect:!0})],c.prototype,"required");d([r.n({type:Number,reflect:!0})],c.prototype,"max");d([r.n({type:Number,reflect:!0})],c.prototype,"maxlength");d([r.n({type:Number,reflect:!0})],c.prototype,"min");d([r.n({type:Number,reflect:!0})],c.prototype,"minlength");d([r.n({type:Number,reflect:!0})],c.prototype,"step");d([r.n({type:String})],c.prototype,"ariaDescribedBy");d([r.n({type:String})],c.prototype,"ariaLabelledby");d([r.n({type:String,reflect:!0})],c.prototype,"name");d([r.n({type:String,reflect:!0})],c.prototype,"pattern");d([r.n({type:String,reflect:!0})],c.prototype,"placeholder");d([r.n({type:String,reflect:!0})],c.prototype,"id");d([r.n({type:Boolean})],c.prototype,"counter");d([r.n({type:Boolean})],c.prototype,"hasError");d([r.n({type:Boolean})],c.prototype,"inline");d([r.n({type:Boolean})],c.prototype,"hasFieldset");d([r.n({type:Boolean})],c.prototype,"optionalTag");d([r.n({type:Boolean})],c.prototype,"requiredTag");d([r.n({type:Boolean})],c.prototype,"skipForwardTestid");d([r.n({type:Boolean,reflect:!0,converter:St})],c.prototype,"useWrapper");d([r.n({type:Boolean,reflect:!0})],c.prototype,"fullwidth");d([r.n({type:Number})],c.prototype,"counterMaxLength");d([r.n({type:String})],c.prototype,"errorMessage");d([r.n({type:String})],c.prototype,"helptext");d([r.n({type:String})],c.prototype,"helptextDropdown");d([r.n({type:String,reflect:!1})],c.prototype,"helptextDropdownButton");d([r.n({type:String})],c.prototype,"label");d([r.n({type:String,reflect:!1})],c.prototype,"optionalText");d([r.n({type:String,reflect:!1})],c.prototype,"requiredText");d([r.n({type:String,reflect:!1})],c.prototype,"tagText");d([r.n({type:String,attribute:"data-testid"})],c.prototype,"dataTestid");d([Vt.r()],c.prototype,"touched");exports.PktInputElement=c;
package/dist/pkt-card.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./card-Cf-UcGAP.cjs"),t=e.PktCard;Object.defineProperty(exports,"PktCard",{enumerable:!0,get:()=>e.PktCard});exports.default=t;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./card-Byrpi1pD.cjs"),t=e.PktCard;Object.defineProperty(exports,"PktCard",{enumerable:!0,get:()=>e.PktCard});exports.default=t;
package/dist/pkt-card.js CHANGED
@@ -1,4 +1,4 @@
1
- import { P as a } from "./card-M1X36b6i.js";
1
+ import { P as a } from "./card-D-tsyQx5.js";
2
2
  const r = a;
3
3
  export {
4
4
  a as PktCard,
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./checkbox-CqoOG2KJ.cjs"),t=e.PktCheckbox;Object.defineProperty(exports,"PktCheckbox",{enumerable:!0,get:()=>e.PktCheckbox});exports.default=t;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./checkbox-BP5zOlPy.cjs"),t=e.PktCheckbox;Object.defineProperty(exports,"PktCheckbox",{enumerable:!0,get:()=>e.PktCheckbox});exports.default=t;
@@ -1,4 +1,4 @@
1
- import { P as o } from "./checkbox-CCmRUWTH.js";
1
+ import { P as o } from "./checkbox-CfXOh6Lw.js";
2
2
  const k = o;
3
3
  export {
4
4
  o as PktCheckbox,
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./combobox-6WP1urZS.cjs"),o=e.PktCombobox;Object.defineProperty(exports,"PktCombobox",{enumerable:!0,get:()=>e.PktCombobox});exports.default=o;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./combobox-DMBUiR8Z.cjs"),o=e.PktCombobox;Object.defineProperty(exports,"PktCombobox",{enumerable:!0,get:()=>e.PktCombobox});exports.default=o;
@@ -1,4 +1,4 @@
1
- import { P as o } from "./combobox-CtHgl1n2.js";
1
+ import { P as o } from "./combobox-BK9xei07.js";
2
2
  const b = o;
3
3
  export {
4
4
  o as PktCombobox,
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./datepicker-DEO1C69C.cjs"),t=e.PktDatepicker;Object.defineProperty(exports,"PktDatepicker",{enumerable:!0,get:()=>e.PktDatepicker});Object.defineProperty(exports,"PktDatepickerMultiple",{enumerable:!0,get:()=>e.PktDatepickerMultiple});Object.defineProperty(exports,"PktDatepickerRange",{enumerable:!0,get:()=>e.PktDatepickerRange});Object.defineProperty(exports,"PktDatepickerSingle",{enumerable:!0,get:()=>e.PktDatepickerSingle});exports.default=t;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./datepicker-C1Virx9Z.cjs"),t=e.PktDatepicker;Object.defineProperty(exports,"PktDatepicker",{enumerable:!0,get:()=>e.PktDatepicker});Object.defineProperty(exports,"PktDatepickerMultiple",{enumerable:!0,get:()=>e.PktDatepickerMultiple});Object.defineProperty(exports,"PktDatepickerRange",{enumerable:!0,get:()=>e.PktDatepickerRange});Object.defineProperty(exports,"PktDatepickerSingle",{enumerable:!0,get:()=>e.PktDatepickerSingle});exports.default=t;
@@ -1,5 +1,5 @@
1
- import { a as e } from "./datepicker-q9haFM81.js";
2
- import { d as p, c as i, b as c } from "./datepicker-q9haFM81.js";
1
+ import { a as e } from "./datepicker-p2LxVkLS.js";
2
+ import { d as p, c as i, b as c } from "./datepicker-p2LxVkLS.js";
3
3
  const a = e;
4
4
  export {
5
5
  e as PktDatepicker,
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./alert-BXbmjri0.cjs"),l=require("./accordionitem-DCZrHVNR.cjs"),m=require("./backlink-BzEvli8m.cjs"),g=require("./button-1jYzMALk.cjs"),P=require("./calendar-Dz1Cnzx5.cjs"),h=require("./card-Cf-UcGAP.cjs"),f=require("./combobox-6WP1urZS.cjs"),y=require("./consent-Cgc6nuiP.cjs"),O=require("./checkbox-CqoOG2KJ.cjs"),t=require("./element-CJ_QKaki.cjs"),j=require("./pkt-slot-controller-BzddBp7z.cjs"),s=require("./ref-BFa5Utho.cjs"),q=require("./class-map-C_erArZz.cjs"),k=require("./datepicker-DEO1C69C.cjs"),x=require("./helptext-EPTR9AIl.cjs"),C=require("./heading--JKFppLS.cjs"),v=require("./icon-BGuizDwk.cjs"),S=require("./input-wrapper-B-Qseywc.cjs"),T=require("./link-Da3pZ_CW.cjs"),$=require("./linkcard-BM23gzhS.cjs"),L=require("./loader-Bo8RCbCJ.cjs"),_=require("./messagebox-C76IcXTl.cjs"),I=require("./modal-Cdz9JcCX.cjs"),A=require("./progressbar-8gzOtJyh.cjs"),p=require("./radiobutton-FwxpKELo.cjs"),B=require("./tag-EFUKrc8q.cjs"),d=require("./tabitem-D5zyipN1.cjs"),D=require("./textarea-CzN0E0TV.cjs"),M=require("./textinput-D8v6D6ie.cjs"),R=require("./select-BbmLn1qh.cjs");var H=Object.defineProperty,w=Object.getOwnPropertyDescriptor,o=(a,e,r,i)=>{for(var n=i>1?void 0:i?w(e,r):e,u=a.length-1,c;u>=0;u--)(c=a[u])&&(n=(i?c(e,r,n):c(n))||n);return i&&n&&H(e,r,n),n};exports.PktComponent=class extends t.PktElement{constructor(){super(),this.string="",this.strings=[],this.darkmode=!1,this._list=[],this.defaultSlot=s.e(),this.namedSlot=s.e(),this.slotController=new j.PktSlotController(this,this.defaultSlot,this.namedSlot)}connectedCallback(){this.strings.length&&this.strings.forEach(e=>{this._list.push(e.toUpperCase())}),super.connectedCallback()}render(){const e={"pkt-component":!0,"pkt-component--has-list":this.strings.length>0,"pkt-darkmode":this.darkmode};return t.x`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./alert-BXbmjri0.cjs"),l=require("./accordionitem-DCZrHVNR.cjs"),m=require("./backlink-BzEvli8m.cjs"),g=require("./button-1jYzMALk.cjs"),P=require("./calendar-Dz1Cnzx5.cjs"),h=require("./card-Byrpi1pD.cjs"),f=require("./combobox-DMBUiR8Z.cjs"),y=require("./consent-Cgc6nuiP.cjs"),O=require("./checkbox-BP5zOlPy.cjs"),t=require("./element-CJ_QKaki.cjs"),j=require("./pkt-slot-controller-BzddBp7z.cjs"),s=require("./ref-BFa5Utho.cjs"),q=require("./class-map-C_erArZz.cjs"),k=require("./datepicker-C1Virx9Z.cjs"),x=require("./helptext-EPTR9AIl.cjs"),C=require("./heading--JKFppLS.cjs"),v=require("./icon-BGuizDwk.cjs"),S=require("./input-wrapper-B-Qseywc.cjs"),T=require("./link-Da3pZ_CW.cjs"),$=require("./linkcard-BM23gzhS.cjs"),L=require("./loader-Bo8RCbCJ.cjs"),_=require("./messagebox-C76IcXTl.cjs"),I=require("./modal-Cdz9JcCX.cjs"),A=require("./progressbar-8gzOtJyh.cjs"),p=require("./radiobutton-BuKXgQm_.cjs"),B=require("./tag-CWj979b6.cjs"),d=require("./tabitem-D5zyipN1.cjs"),D=require("./textarea-BC962syN.cjs"),M=require("./textinput-DdcR7OZ-.cjs"),R=require("./select-BWnw7CJy.cjs");var H=Object.defineProperty,w=Object.getOwnPropertyDescriptor,o=(a,e,r,i)=>{for(var n=i>1?void 0:i?w(e,r):e,u=a.length-1,c;u>=0;u--)(c=a[u])&&(n=(i?c(e,r,n):c(n))||n);return i&&n&&H(e,r,n),n};exports.PktComponent=class extends t.PktElement{constructor(){super(),this.string="",this.strings=[],this.darkmode=!1,this._list=[],this.defaultSlot=s.e(),this.namedSlot=s.e(),this.slotController=new j.PktSlotController(this,this.defaultSlot,this.namedSlot)}connectedCallback(){this.strings.length&&this.strings.forEach(e=>{this._list.push(e.toUpperCase())}),super.connectedCallback()}render(){const e={"pkt-component":!0,"pkt-component--has-list":this.strings.length>0,"pkt-darkmode":this.darkmode};return t.x`
2
2
  <div class="${q.e(e)}">
3
3
  <h1 class="pkt-txt-28">${this.string}</h1>
4
4
 
package/dist/pkt-index.js CHANGED
@@ -4,15 +4,15 @@ import { P as D } from "./backlink-CI_jMGzZ.js";
4
4
  import { P as O } from "./button-lDOnZON6.js";
5
5
  import { c as f } from "./calendar-Bz27nuTP.js";
6
6
  import { P as j } from "./calendar-Bz27nuTP.js";
7
- import { P as G } from "./card-M1X36b6i.js";
8
- import { P as K } from "./combobox-CtHgl1n2.js";
7
+ import { P as G } from "./card-D-tsyQx5.js";
8
+ import { P as K } from "./combobox-BK9xei07.js";
9
9
  import { P as U } from "./consent-CYFXjOXF.js";
10
- import { P as q } from "./checkbox-CCmRUWTH.js";
10
+ import { P as q } from "./checkbox-CfXOh6Lw.js";
11
11
  import { P as d, t as h, x as P, n, a as c } from "./element-CRDRygXu.js";
12
12
  import { P as x } from "./pkt-slot-controller-BPGj-LC5.js";
13
13
  import { e as m, n as k } from "./ref-Xa5dbh--.js";
14
14
  import { e as u } from "./class-map-wy7PUk0P.js";
15
- import { P as F, a as J } from "./datepicker-q9haFM81.js";
15
+ import { P as F, a as J } from "./datepicker-p2LxVkLS.js";
16
16
  import { P as V } from "./helptext-Cs3QHeEy.js";
17
17
  import { P as Y } from "./heading-Cs5yGnJg.js";
18
18
  import { P as tt } from "./icon-1dy7UZcu.js";
@@ -23,12 +23,12 @@ import { P as pt } from "./loader-BVvBzaPI.js";
23
23
  import { P as Pt } from "./messagebox-DwdMXoAe.js";
24
24
  import { P as kt } from "./modal-BGXk3f9u.js";
25
25
  import { P as dt } from "./progressbar-kxcBEspG.js";
26
- import { P as ct, P as xt } from "./radiobutton-DuAo3CdN.js";
27
- import { P as gt } from "./tag-CqMgt01I.js";
26
+ import { P as ct, P as xt } from "./radiobutton-C_MzK8dE.js";
27
+ import { P as gt } from "./tag-DDfymBgc.js";
28
28
  import { a as bt, P as St } from "./tabitem-NV2fzs_-.js";
29
- import { P as $t } from "./textarea-CIb4VWtN.js";
30
- import { P as _t } from "./textinput-D5_RTkRY.js";
31
- import { P as Tt } from "./select-wak-jukY.js";
29
+ import { P as $t } from "./textarea-O0r9TzqP.js";
30
+ import { P as _t } from "./textinput-COK0LcXj.js";
31
+ import { P as Tt } from "./select-BHEtNwcz.js";
32
32
  var g = Object.defineProperty, v = Object.getOwnPropertyDescriptor, s = (t, e, i, a) => {
33
33
  for (var r = a > 1 ? void 0 : a ? v(e, i) : e, p = t.length - 1, l; p >= 0; p--)
34
34
  (l = t[p]) && (r = (a ? l(e, i, r) : l(r)) || r);
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./radiobutton-FwxpKELo.cjs"),e=t.PktRadioButton;Object.defineProperty(exports,"PktRadioButton",{enumerable:!0,get:()=>t.PktRadioButton});exports.default=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./radiobutton-BuKXgQm_.cjs"),e=t.PktRadioButton;Object.defineProperty(exports,"PktRadioButton",{enumerable:!0,get:()=>t.PktRadioButton});exports.default=e;
@@ -1,4 +1,4 @@
1
- import { P as t } from "./radiobutton-DuAo3CdN.js";
1
+ import { P as t } from "./radiobutton-C_MzK8dE.js";
2
2
  const a = t;
3
3
  export {
4
4
  t as PktRadioButton,
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./select-BbmLn1qh.cjs"),t=e.PktSelect;Object.defineProperty(exports,"PktSelect",{enumerable:!0,get:()=>e.PktSelect});exports.default=t;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./select-BWnw7CJy.cjs"),t=e.PktSelect;Object.defineProperty(exports,"PktSelect",{enumerable:!0,get:()=>e.PktSelect});exports.default=t;
@@ -1,4 +1,4 @@
1
- import { P as t } from "./select-wak-jukY.js";
1
+ import { P as t } from "./select-BHEtNwcz.js";
2
2
  const a = t;
3
3
  export {
4
4
  t as PktSelect,
package/dist/pkt-tag.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./tag-EFUKrc8q.cjs"),t=e.PktTag;Object.defineProperty(exports,"PktTag",{enumerable:!0,get:()=>e.PktTag});exports.default=t;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./tag-CWj979b6.cjs"),t=e.PktTag;Object.defineProperty(exports,"PktTag",{enumerable:!0,get:()=>e.PktTag});exports.default=t;
package/dist/pkt-tag.js CHANGED
@@ -1,4 +1,4 @@
1
- import { P as a } from "./tag-CqMgt01I.js";
1
+ import { P as a } from "./tag-DDfymBgc.js";
2
2
  const o = a;
3
3
  export {
4
4
  a as PktTag,
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./textarea-CzN0E0TV.cjs"),t=e.PktTextarea;Object.defineProperty(exports,"PktTextarea",{enumerable:!0,get:()=>e.PktTextarea});exports.default=t;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./textarea-BC962syN.cjs"),t=e.PktTextarea;Object.defineProperty(exports,"PktTextarea",{enumerable:!0,get:()=>e.PktTextarea});exports.default=t;
@@ -1,4 +1,4 @@
1
- import { P as a } from "./textarea-CIb4VWtN.js";
1
+ import { P as a } from "./textarea-O0r9TzqP.js";
2
2
  const e = a;
3
3
  export {
4
4
  a as PktTextarea,
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./textinput-D8v6D6ie.cjs"),t=e.PktTextinput;Object.defineProperty(exports,"PktTextinput",{enumerable:!0,get:()=>e.PktTextinput});exports.default=t;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./textinput-DdcR7OZ-.cjs"),t=e.PktTextinput;Object.defineProperty(exports,"PktTextinput",{enumerable:!0,get:()=>e.PktTextinput});exports.default=t;
@@ -1,4 +1,4 @@
1
- import { P as t } from "./textinput-D5_RTkRY.js";
1
+ import { P as t } from "./textinput-COK0LcXj.js";
2
2
  const p = t;
3
3
  export {
4
4
  t as PktTextinput,
@@ -1,4 +1,4 @@
1
- "use strict";const t=require("./element-CJ_QKaki.cjs"),r=require("./state-DSjcvzDN.cjs"),u=require("./input-element-KUsQQ-1d.cjs"),h=require("./ref-BFa5Utho.cjs"),c=require("./class-map-C_erArZz.cjs");var d=Object.defineProperty,k=Object.getOwnPropertyDescriptor,i=(p,e,n,a)=>{for(var s=a>1?void 0:a?k(e,n):e,o=p.length-1,l;o>=0;o--)(l=p[o])&&(s=(a?l(e,n,s):l(s))||s);return a&&s&&d(e,n,s),s};exports.PktRadioButton=class extends u.PktInputElement{constructor(){super(...arguments),this.inputRef=h.e(),this.value="",this.checkHelptext=null,this.defaultChecked=!1,this.hasTile=!1,this.checked=null,this.type="radio",this.tagText=null,this.optionalTag=!1,this.optionalText="Valgfritt",this.requiredTag=!1,this.requiredText="Må fylles ut",this._checked=!1}connectedCallback(){super.connectedCallback()}attributeChangedCallback(e,n,a){e==="defaultChecked"&&(this._checked=this.defaultChecked),e==="checked"&&(this._checked=this.checked===""||this.checked==="true"||this.checked===!0),super.attributeChangedCallback(e,n,a)}render(){const e=c.e({"pkt-input-check__input":!0,"pkt-input-check__input--tile":this.hasTile,"pkt-input-check__input--tile-disabled":this.disabled&&this.hasTile}),n=c.e({"pkt-input-check__input-checkbox":!0,"pkt-input-check__input-checkbox--error":this.hasError}),a=c.e({"pkt-input-check__input-label":!0,"pkt-input-check__input-label--disabled":this.disabled,"pkt-sr-only":this.hideLabel}),s="pkt-tag pkt-tag--small pkt-tag--thin-text",o=()=>t.x`
1
+ "use strict";const t=require("./element-CJ_QKaki.cjs"),r=require("./state-DSjcvzDN.cjs"),u=require("./input-element-BmXkhljw.cjs"),h=require("./ref-BFa5Utho.cjs"),c=require("./class-map-C_erArZz.cjs");var d=Object.defineProperty,k=Object.getOwnPropertyDescriptor,i=(p,e,n,a)=>{for(var s=a>1?void 0:a?k(e,n):e,o=p.length-1,l;o>=0;o--)(l=p[o])&&(s=(a?l(e,n,s):l(s))||s);return a&&s&&d(e,n,s),s};exports.PktRadioButton=class extends u.PktInputElement{constructor(){super(...arguments),this.inputRef=h.e(),this.value="",this.checkHelptext=null,this.defaultChecked=!1,this.hasTile=!1,this.checked=null,this.type="radio",this.tagText=null,this.optionalTag=!1,this.optionalText="Valgfritt",this.requiredTag=!1,this.requiredText="Må fylles ut",this._checked=!1}connectedCallback(){super.connectedCallback()}attributeChangedCallback(e,n,a){e==="defaultChecked"&&(this._checked=this.defaultChecked),e==="checked"&&(this._checked=this.checked===""||this.checked==="true"||this.checked===!0),super.attributeChangedCallback(e,n,a)}render(){const e=c.e({"pkt-input-check__input":!0,"pkt-input-check__input--tile":this.hasTile,"pkt-input-check__input--tile-disabled":this.disabled&&this.hasTile}),n=c.e({"pkt-input-check__input-checkbox":!0,"pkt-input-check__input-checkbox--error":this.hasError}),a=c.e({"pkt-input-check__input-label":!0,"pkt-input-check__input-label--disabled":this.disabled,"pkt-sr-only":this.hideLabel}),s="pkt-tag pkt-tag--small pkt-tag--thin-text",o=()=>t.x`
2
2
  ${this.tagText?t.x`<span class=${s+" pkt-tag--gray"}>${this.tagText}</span>`:t.E}
3
3
  ${this.optionalTag?t.x`<span class=${s+" pkt-tag--blue-light"}>${this.optionalText}</span>`:t.E}
4
4
  ${this.requiredTag?t.x`<span class=${s+" pkt-tag--beige"}>${this.requiredText}</span>`:t.E}
@@ -1,6 +1,6 @@
1
1
  import { x as h, E as n, n as s, a as d } from "./element-CRDRygXu.js";
2
2
  import { r as k } from "./state-DS_kr2Fy.js";
3
- import { P as f } from "./input-element-Dqu8udwd.js";
3
+ import { P as f } from "./input-element-B0VPRK_E.js";
4
4
  import { e as g, n as y } from "./ref-Xa5dbh--.js";
5
5
  import { e as u } from "./class-map-wy7PUk0P.js";
6
6
  var $ = Object.defineProperty, b = Object.getOwnPropertyDescriptor, i = (e, p, c, l) => {
@@ -2,7 +2,7 @@ import { x as r, n as c, a as v } from "./element-CRDRygXu.js";
2
2
  import { r as f } from "./state-DS_kr2Fy.js";
3
3
  import { e as u, n as d } from "./ref-Xa5dbh--.js";
4
4
  import { o as l } from "./if-defined-BWZGb3bh.js";
5
- import { P as _ } from "./input-element-Dqu8udwd.js";
5
+ import { P as _ } from "./input-element-B0VPRK_E.js";
6
6
  import { P as x } from "./pkt-options-controller-CZO1nxZ8.js";
7
7
  import { P as b } from "./pkt-slot-controller-BPGj-LC5.js";
8
8
  import "./input-wrapper-Wu3Yv-bn.js";
@@ -101,7 +101,7 @@ let h = class extends _ {
101
101
  ?inline=${this.inline}
102
102
  ?optionalTag=${this.optionalTag}
103
103
  ?requiredTag=${this.requiredTag}
104
- ?useWrapper=${this.useWrapper}
104
+ useWrapper=${this.useWrapper}
105
105
  ariaDescribedBy=${l(this.ariaDescribedBy)}
106
106
  class="pkt-select"
107
107
  errorMessage=${l(this.errorMessage)}
@@ -1,4 +1,4 @@
1
- "use strict";const h=require("./element-CJ_QKaki.cjs"),u=require("./state-DSjcvzDN.cjs"),r=require("./ref-BFa5Utho.cjs"),o=require("./if-defined-Bc9-_I01.cjs"),d=require("./input-element-KUsQQ-1d.cjs"),c=require("./pkt-options-controller-CiuBG6Lt.cjs"),v=require("./pkt-slot-controller-BzddBp7z.cjs");require("./input-wrapper-B-Qseywc.cjs");var f=Object.defineProperty,_=Object.getOwnPropertyDescriptor,a=(p,t,e,s)=>{for(var i=s>1?void 0:s?_(t,e):t,l=p.length-1,n;l>=0;l--)(n=p[l])&&(i=(s?n(t,e,i):n(i))||i);return s&&i&&f(t,e,i),i};exports.PktSelect=class extends d.PktInputElement{constructor(){super(),this.inputRef=r.e(),this.helptextSlot=r.e(),this._optionsProp=[],this.value="",this._options=[],this.selectedIndex=-1,this.selectedOptions=void 0,this.optionsController=new c.PktOptionsSlotController(this),this.slotController=new v.PktSlotController(this,this.helptextSlot),this.slotController.skipOptions=!0}get options(){return this._options.map(t=>({...t,selected:t.value===this.value}))}set options(t){this._optionsProp=t,this.requestUpdate("_optionsProp",this._options)}connectedCallback(){super.connectedCallback();const t=this._optionsProp.length>0,e=this.optionsController.nodes.length&&this.optionsController.nodes.length>0;!t&&e?this.optionsController.nodes.forEach(s=>{const i={value:s.hasAttribute("value")?s.getAttribute("value")??"":s.textContent??"",label:s.textContent||s.getAttribute("value")||"",disabled:s.hasAttribute("disabled"),selected:s.hasAttribute("selected"),hidden:s.hasAttribute("data-hidden")};s.getAttribute("selected")&&!this.value&&(this.value=i.value),this._options.push(i)}):(this._options=this._optionsProp,this._options.forEach(s=>{s.selected&&!this.value&&(this.value=s.value)}))}add(t,e){const s={value:t.value||t.text,label:t.text||t.value,selected:t.selected,disabled:t.disabled};if(e===void 0)this._options.push(s);else if(typeof e=="number")this._options.splice(e,0,s);else{const i=e.value||e.text,l=this._options.findIndex(n=>n.value===i);l>=0?this._options.splice(l,0,s):this._options.push(s)}t.selected&&(this.value=t.value||t.text,this.selectedIndex=this._options.findIndex(i=>i.value===this.value)),this.requestUpdate()}remove(t){var e;typeof t=="number"&&(this.selectedIndex===t&&(this.value=((e=this._options[0])==null?void 0:e.value)||""),this._options.splice(t,1),this.requestUpdate())}item(t){var e;return(e=this.inputRef.value)==null?void 0:e.item(t)}namedItem(t){var e;return(e=this.inputRef.value)==null?void 0:e.namedItem(t)}showPicker(){this.inputRef.value&&"showPicker"in this.inputRef.value&&this.inputRef.value.showPicker()}attributeChangedCallback(t,e,s){var i,l;t==="options"&&(this._options=s?JSON.parse(s):[]),t==="value"&&this.value!==e&&(this.selectedIndex=this.touched?this.returnNumberOrNull((i=this.inputRef.value)==null?void 0:i.selectedIndex):this._options.findIndex(n=>n.value===s),this.selectedOptions=(l=this.inputRef.value)==null?void 0:l.selectedOptions,this.valueChanged(s,e)),super.attributeChangedCallback(t,e,s)}update(t){var e,s;super.update(t),t.has("_optionsProp")&&this._optionsProp.length>0&&(this._options=this._optionsProp,this.requestUpdate("_options"),!this.value&&this._options.length>0&&(this.value=this._options[0].value,this.selectedIndex=0)),t.has("value")&&this.value!==t.get("value")&&(this.selectedIndex=this.touched?this.returnNumberOrNull((e=this.inputRef.value)==null?void 0:e.selectedIndex):this._options.findIndex(i=>i.value===this.value),this.selectedOptions=(s=this.inputRef.value)==null?void 0:s.selectedOptions,this.valueChanged(this.value,t.get("value"))),t.has("id")&&!this.name&&this.id&&(this.name=this.id)}firstUpdated(t){var e;super.firstUpdated(t),this._optionsProp.length&&(this._options=this._optionsProp),!this.value&&this._options.length>0?(this.value=this._options[0].value,this.selectedIndex=0):this.selectedIndex=this._options.findIndex(s=>s.value===this.value),this.selectedOptions=(e=this.inputRef.value)==null?void 0:e.selectedOptions}render(){const t=`pkt-input ${this.fullwidth?"pkt-input--fullwidth":""}`;return h.x`
1
+ "use strict";const h=require("./element-CJ_QKaki.cjs"),u=require("./state-DSjcvzDN.cjs"),r=require("./ref-BFa5Utho.cjs"),o=require("./if-defined-Bc9-_I01.cjs"),d=require("./input-element-BmXkhljw.cjs"),c=require("./pkt-options-controller-CiuBG6Lt.cjs"),v=require("./pkt-slot-controller-BzddBp7z.cjs");require("./input-wrapper-B-Qseywc.cjs");var f=Object.defineProperty,_=Object.getOwnPropertyDescriptor,a=(p,t,e,s)=>{for(var i=s>1?void 0:s?_(t,e):t,l=p.length-1,n;l>=0;l--)(n=p[l])&&(i=(s?n(t,e,i):n(i))||i);return s&&i&&f(t,e,i),i};exports.PktSelect=class extends d.PktInputElement{constructor(){super(),this.inputRef=r.e(),this.helptextSlot=r.e(),this._optionsProp=[],this.value="",this._options=[],this.selectedIndex=-1,this.selectedOptions=void 0,this.optionsController=new c.PktOptionsSlotController(this),this.slotController=new v.PktSlotController(this,this.helptextSlot),this.slotController.skipOptions=!0}get options(){return this._options.map(t=>({...t,selected:t.value===this.value}))}set options(t){this._optionsProp=t,this.requestUpdate("_optionsProp",this._options)}connectedCallback(){super.connectedCallback();const t=this._optionsProp.length>0,e=this.optionsController.nodes.length&&this.optionsController.nodes.length>0;!t&&e?this.optionsController.nodes.forEach(s=>{const i={value:s.hasAttribute("value")?s.getAttribute("value")??"":s.textContent??"",label:s.textContent||s.getAttribute("value")||"",disabled:s.hasAttribute("disabled"),selected:s.hasAttribute("selected"),hidden:s.hasAttribute("data-hidden")};s.getAttribute("selected")&&!this.value&&(this.value=i.value),this._options.push(i)}):(this._options=this._optionsProp,this._options.forEach(s=>{s.selected&&!this.value&&(this.value=s.value)}))}add(t,e){const s={value:t.value||t.text,label:t.text||t.value,selected:t.selected,disabled:t.disabled};if(e===void 0)this._options.push(s);else if(typeof e=="number")this._options.splice(e,0,s);else{const i=e.value||e.text,l=this._options.findIndex(n=>n.value===i);l>=0?this._options.splice(l,0,s):this._options.push(s)}t.selected&&(this.value=t.value||t.text,this.selectedIndex=this._options.findIndex(i=>i.value===this.value)),this.requestUpdate()}remove(t){var e;typeof t=="number"&&(this.selectedIndex===t&&(this.value=((e=this._options[0])==null?void 0:e.value)||""),this._options.splice(t,1),this.requestUpdate())}item(t){var e;return(e=this.inputRef.value)==null?void 0:e.item(t)}namedItem(t){var e;return(e=this.inputRef.value)==null?void 0:e.namedItem(t)}showPicker(){this.inputRef.value&&"showPicker"in this.inputRef.value&&this.inputRef.value.showPicker()}attributeChangedCallback(t,e,s){var i,l;t==="options"&&(this._options=s?JSON.parse(s):[]),t==="value"&&this.value!==e&&(this.selectedIndex=this.touched?this.returnNumberOrNull((i=this.inputRef.value)==null?void 0:i.selectedIndex):this._options.findIndex(n=>n.value===s),this.selectedOptions=(l=this.inputRef.value)==null?void 0:l.selectedOptions,this.valueChanged(s,e)),super.attributeChangedCallback(t,e,s)}update(t){var e,s;super.update(t),t.has("_optionsProp")&&this._optionsProp.length>0&&(this._options=this._optionsProp,this.requestUpdate("_options"),!this.value&&this._options.length>0&&(this.value=this._options[0].value,this.selectedIndex=0)),t.has("value")&&this.value!==t.get("value")&&(this.selectedIndex=this.touched?this.returnNumberOrNull((e=this.inputRef.value)==null?void 0:e.selectedIndex):this._options.findIndex(i=>i.value===this.value),this.selectedOptions=(s=this.inputRef.value)==null?void 0:s.selectedOptions,this.valueChanged(this.value,t.get("value"))),t.has("id")&&!this.name&&this.id&&(this.name=this.id)}firstUpdated(t){var e;super.firstUpdated(t),this._optionsProp.length&&(this._options=this._optionsProp),!this.value&&this._options.length>0?(this.value=this._options[0].value,this.selectedIndex=0):this.selectedIndex=this._options.findIndex(s=>s.value===this.value),this.selectedOptions=(e=this.inputRef.value)==null?void 0:e.selectedOptions}render(){const t=`pkt-input ${this.fullwidth?"pkt-input--fullwidth":""}`;return h.x`
2
2
  <pkt-input-wrapper
3
3
  ?counter=${this.counter}
4
4
  ?disabled=${this.disabled}
@@ -7,7 +7,7 @@
7
7
  ?inline=${this.inline}
8
8
  ?optionalTag=${this.optionalTag}
9
9
  ?requiredTag=${this.requiredTag}
10
- ?useWrapper=${this.useWrapper}
10
+ useWrapper=${this.useWrapper}
11
11
  ariaDescribedBy=${o.o(this.ariaDescribedBy)}
12
12
  class="pkt-select"
13
13
  errorMessage=${o.o(this.errorMessage)}
@@ -1,17 +1,17 @@
1
- "use strict";const u=require("./class-map-C_erArZz.cjs"),t=require("./element-CJ_QKaki.cjs"),k=require("./state-DSjcvzDN.cjs"),g=require("./pkt-slot-controller-BzddBp7z.cjs"),c=require("./ref-BFa5Utho.cjs");require("./icon-BGuizDwk.cjs");const h=require("./if-defined-Bc9-_I01.cjs"),f={size:{default:"medium"},skin:{default:"blue"},closeTag:{default:!1},type:{default:"button"}},r={props:f};var d=Object.defineProperty,y=Object.getOwnPropertyDescriptor,i=(n,e,a,o)=>{for(var s=o>1?void 0:o?y(e,a):e,l=n.length-1,p;l>=0;l--)(p=n[l])&&(s=(o?p(e,a,s):p(s))||s);return o&&s&&d(e,a,s),s};exports.PktTag=class extends t.PktElement{constructor(){super(),this.defaultSlot=c.e(),this.closeTag=r.props.closeTag.default,this.size=r.props.size.default,this.skin=r.props.skin.default,this.textStyle=null,this.iconName=void 0,this.type=r.props.type.default,this.ariaLabel=null,this._isClosed=!1,this._ariaDescription=null,this.close=e=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent("close",{detail:{origin:e},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("on-close",{detail:{origin:e},bubbles:!0,composed:!0}))},this.slotController=new g.PktSlotController(this,this.defaultSlot),this._isClosed=!1}firstUpdated(e){var a,o;if(super.firstUpdated(e),this.closeTag&&!this.ariaLabel){const s=(o=(a=this.defaultSlot.value)==null?void 0:a.textContent)==null?void 0:o.trim();s&&(this._ariaDescription=`Klikk for å fjerne ${s}`)}}render(){const e={"pkt-tag":!0,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,[`pkt-tag--${this.textStyle}`]:!!this.textStyle},a={"pkt-tag":!0,"pkt-btn":!0,"pkt-btn--tertiary":!0,[`pkt-tag--${this.textStyle}`]:!!this.textStyle,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,"pkt-btn--icons-right-and-left":this.closeTag&&!!this.iconName,"pkt-hide":this._isClosed};return this.closeTag?t.x`
1
+ "use strict";const h=require("./class-map-C_erArZz.cjs"),t=require("./element-CJ_QKaki.cjs"),k=require("./state-DSjcvzDN.cjs"),g=require("./pkt-slot-controller-BzddBp7z.cjs"),c=require("./ref-BFa5Utho.cjs");require("./icon-BGuizDwk.cjs");const u=require("./if-defined-Bc9-_I01.cjs"),f={size:{default:"medium"},skin:{default:"blue"},closeTag:{default:!1},type:{default:"button"}},r={props:f};var d=Object.defineProperty,y=Object.getOwnPropertyDescriptor,i=(n,e,a,o)=>{for(var s=o>1?void 0:o?y(e,a):e,l=n.length-1,p;l>=0;l--)(p=n[l])&&(s=(o?p(e,a,s):p(s))||s);return o&&s&&d(e,a,s),s};exports.PktTag=class extends t.PktElement{constructor(){super(),this.defaultSlot=c.e(),this.closeTag=r.props.closeTag.default,this.size=r.props.size.default,this.skin=r.props.skin.default,this.textStyle=null,this.iconName=void 0,this.type=r.props.type.default,this.ariaLabel=null,this._isClosed=!1,this._ariaDescription=null,this.close=e=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent("close",{detail:{origin:e},bubbles:!1,composed:!0})),this.dispatchEvent(new CustomEvent("on-close",{detail:{origin:e},bubbles:!1,composed:!0}))},this.slotController=new g.PktSlotController(this,this.defaultSlot),this._isClosed=!1}firstUpdated(e){var a,o;if(super.firstUpdated(e),this.closeTag&&!this.ariaLabel){const s=(o=(a=this.defaultSlot.value)==null?void 0:a.textContent)==null?void 0:o.trim();s&&(this._ariaDescription=`Klikk for å fjerne ${s}`)}}render(){const e={"pkt-tag":!0,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,[`pkt-tag--${this.textStyle}`]:!!this.textStyle},a={"pkt-tag":!0,"pkt-btn":!0,"pkt-btn--tertiary":!0,[`pkt-tag--${this.textStyle}`]:!!this.textStyle,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,"pkt-btn--icons-right-and-left":this.closeTag&&!!this.iconName,"pkt-hide":this._isClosed};return this.closeTag?t.x`
2
2
  <button
3
- class=${u.e(a)}
3
+ class=${h.e(a)}
4
4
  type=${this.type}
5
5
  @click=${this.close}
6
- aria-label=${h.o(this.ariaLabel||void 0)}
7
- aria-description=${h.o(this._ariaDescription||void 0)}
6
+ aria-label=${u.o(this.ariaLabel||void 0)}
7
+ aria-description=${u.o(this._ariaDescription||void 0)}
8
8
  >
9
9
  ${this.iconName&&t.x`<pkt-icon class="pkt-tag__icon" name=${this.iconName}></pkt-icon>`}
10
10
  <span ${c.n(this.defaultSlot)}></span>
11
11
  <pkt-icon class="pkt-tag__close-btn" name="close"></pkt-icon>
12
12
  </button>
13
13
  `:t.x`
14
- <span class=${u.e(e)}>
14
+ <span class=${h.e(e)}>
15
15
  ${this.iconName&&t.x`<pkt-icon class="pkt-tag__icon" name=${this.iconName}></pkt-icon>`}
16
16
  <span ${c.n(this.defaultSlot)}></span>
17
17
  </span>
@@ -1,5 +1,5 @@
1
1
  import { e as u } from "./class-map-wy7PUk0P.js";
2
- import { P as m, x as l, n as r, a as g } from "./element-CRDRygXu.js";
2
+ import { P as m, x as p, n as r, a as g } from "./element-CRDRygXu.js";
3
3
  import { r as k } from "./state-DS_kr2Fy.js";
4
4
  import { P as y } from "./pkt-slot-controller-BPGj-LC5.js";
5
5
  import { e as b, n as f } from "./ref-Xa5dbh--.js";
@@ -8,18 +8,18 @@ import { o as d } from "./if-defined-BWZGb3bh.js";
8
8
  const _ = { size: { default: "medium" }, skin: { default: "blue" }, closeTag: { default: !1 }, type: { default: "button" } }, n = {
9
9
  props: _
10
10
  };
11
- var $ = Object.defineProperty, S = Object.getOwnPropertyDescriptor, e = (s, i, p, o) => {
12
- for (var a = o > 1 ? void 0 : o ? S(i, p) : i, c = s.length - 1, h; c >= 0; c--)
13
- (h = s[c]) && (a = (o ? h(i, p, a) : h(a)) || a);
14
- return o && a && $(i, p, a), a;
11
+ var $ = Object.defineProperty, S = Object.getOwnPropertyDescriptor, e = (s, i, l, o) => {
12
+ for (var a = o > 1 ? void 0 : o ? S(i, l) : i, c = s.length - 1, h; c >= 0; c--)
13
+ (h = s[c]) && (a = (o ? h(i, l, a) : h(a)) || a);
14
+ return o && a && $(i, l, a), a;
15
15
  };
16
16
  let t = class extends m {
17
17
  constructor() {
18
18
  super(), this.defaultSlot = b(), this.closeTag = n.props.closeTag.default, this.size = n.props.size.default, this.skin = n.props.skin.default, this.textStyle = null, this.iconName = void 0, this.type = n.props.type.default, this.ariaLabel = null, this._isClosed = !1, this._ariaDescription = null, this.close = (s) => {
19
19
  this._isClosed = !0, this.dispatchEvent(
20
- new CustomEvent("close", { detail: { origin: s }, bubbles: !0, composed: !0 })
20
+ new CustomEvent("close", { detail: { origin: s }, bubbles: !1, composed: !0 })
21
21
  ), this.dispatchEvent(
22
- new CustomEvent("on-close", { detail: { origin: s }, bubbles: !0, composed: !0 })
22
+ new CustomEvent("on-close", { detail: { origin: s }, bubbles: !1, composed: !0 })
23
23
  );
24
24
  }, this.slotController = new y(this, this.defaultSlot), this._isClosed = !1;
25
25
  }
@@ -27,9 +27,9 @@ let t = class extends m {
27
27
  * Lifecycle
28
28
  */
29
29
  firstUpdated(s) {
30
- var i, p;
30
+ var i, l;
31
31
  if (super.firstUpdated(s), this.closeTag && !this.ariaLabel) {
32
- const o = (p = (i = this.defaultSlot.value) == null ? void 0 : i.textContent) == null ? void 0 : p.trim();
32
+ const o = (l = (i = this.defaultSlot.value) == null ? void 0 : i.textContent) == null ? void 0 : l.trim();
33
33
  o && (this._ariaDescription = `Klikk for å fjerne ${o}`);
34
34
  }
35
35
  }
@@ -49,7 +49,7 @@ let t = class extends m {
49
49
  "pkt-btn--icons-right-and-left": this.closeTag && !!this.iconName,
50
50
  "pkt-hide": this._isClosed
51
51
  };
52
- return this.closeTag ? l`
52
+ return this.closeTag ? p`
53
53
  <button
54
54
  class=${u(i)}
55
55
  type=${this.type}
@@ -57,13 +57,13 @@ let t = class extends m {
57
57
  aria-label=${d(this.ariaLabel || void 0)}
58
58
  aria-description=${d(this._ariaDescription || void 0)}
59
59
  >
60
- ${this.iconName && l`<pkt-icon class="pkt-tag__icon" name=${this.iconName}></pkt-icon>`}
60
+ ${this.iconName && p`<pkt-icon class="pkt-tag__icon" name=${this.iconName}></pkt-icon>`}
61
61
  <span ${f(this.defaultSlot)}></span>
62
62
  <pkt-icon class="pkt-tag__close-btn" name="close"></pkt-icon>
63
63
  </button>
64
- ` : l`
64
+ ` : p`
65
65
  <span class=${u(s)}>
66
- ${this.iconName && l`<pkt-icon class="pkt-tag__icon" name=${this.iconName}></pkt-icon>`}
66
+ ${this.iconName && p`<pkt-icon class="pkt-tag__icon" name=${this.iconName}></pkt-icon>`}
67
67
  <span ${f(this.defaultSlot)}></span>
68
68
  </span>
69
69
  `;
@@ -1,4 +1,4 @@
1
- "use strict";const s=require("./element-CJ_QKaki.cjs"),p=require("./if-defined-Bc9-_I01.cjs"),c=require("./state-DSjcvzDN.cjs"),l=require("./ref-BFa5Utho.cjs"),$=require("./class-map-C_erArZz.cjs"),a=require("./directive-C7oCP5Bh.cjs"),d=require("./directive-helpers-4oOjKnGY.cjs"),x=require("./input-element-KUsQQ-1d.cjs"),T=require("./pkt-slot-controller-BzddBp7z.cjs");require("./input-wrapper-B-Qseywc.cjs");require("./icon-BGuizDwk.cjs");/**
1
+ "use strict";const s=require("./element-CJ_QKaki.cjs"),p=require("./if-defined-Bc9-_I01.cjs"),c=require("./state-DSjcvzDN.cjs"),l=require("./ref-BFa5Utho.cjs"),$=require("./class-map-C_erArZz.cjs"),a=require("./directive-C7oCP5Bh.cjs"),d=require("./directive-helpers-4oOjKnGY.cjs"),x=require("./input-element-BmXkhljw.cjs"),T=require("./pkt-slot-controller-BzddBp7z.cjs");require("./input-wrapper-B-Qseywc.cjs");require("./icon-BGuizDwk.cjs");/**
2
2
  * @license
3
3
  * Copyright 2020 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
@@ -11,7 +11,7 @@
11
11
  ?optionalTag=${this.optionalTag}
12
12
  ?required=${this.required}
13
13
  ?requiredTag=${this.requiredTag}
14
- ?useWrapper=${this.useWrapper}
14
+ useWrapper=${this.useWrapper}
15
15
  .ariaDescribedBy=${this.ariaDescribedBy}
16
16
  .counterCurrent=${this.counterCurrent}
17
17
  .counterMaxLength=${this.counterMaxLength}
@@ -5,7 +5,7 @@ import { e as m, n as c } from "./ref-Xa5dbh--.js";
5
5
  import { e as v } from "./class-map-wy7PUk0P.js";
6
6
  import { e as T, i as b, t as a } from "./directive-oAbCiebi.js";
7
7
  import { f as y, m as w } from "./directive-helpers-BzAtj9by.js";
8
- import { P as C } from "./input-element-Dqu8udwd.js";
8
+ import { P as C } from "./input-element-B0VPRK_E.js";
9
9
  import { P as E } from "./pkt-slot-controller-BPGj-LC5.js";
10
10
  import "./input-wrapper-Wu3Yv-bn.js";
11
11
  import "./icon-1dy7UZcu.js";
@@ -64,7 +64,7 @@ let o = class extends C {
64
64
  ?optionalTag=${this.optionalTag}
65
65
  ?required=${this.required}
66
66
  ?requiredTag=${this.requiredTag}
67
- ?useWrapper=${this.useWrapper}
67
+ useWrapper=${this.useWrapper}
68
68
  .ariaDescribedBy=${this.ariaDescribedBy}
69
69
  .counterCurrent=${this.counterCurrent}
70
70
  .counterMaxLength=${this.counterMaxLength}
@@ -3,7 +3,7 @@ import { o as u } from "./if-defined-BWZGb3bh.js";
3
3
  import { r as f } from "./state-DS_kr2Fy.js";
4
4
  import { e as d, n as m } from "./ref-Xa5dbh--.js";
5
5
  import { e as g } from "./class-map-wy7PUk0P.js";
6
- import { P as x } from "./input-element-Dqu8udwd.js";
6
+ import { P as x } from "./input-element-B0VPRK_E.js";
7
7
  import { P as v } from "./pkt-slot-controller-BPGj-LC5.js";
8
8
  import "./input-wrapper-Wu3Yv-bn.js";
9
9
  import "./icon-1dy7UZcu.js";
@@ -40,7 +40,7 @@ let s = class extends x {
40
40
  ?optionalTag=${this.optionalTag}
41
41
  ?required=${this.required}
42
42
  ?requiredTag=${this.requiredTag}
43
- ?useWrapper=${this.useWrapper}
43
+ useWrapper=${this.useWrapper}
44
44
  .ariaDescribedBy=${this.ariaDescribedBy}
45
45
  .counterCurrent=${this.counterCurrent}
46
46
  .counterMaxLength=${this.counterMaxLength}
@@ -1,4 +1,4 @@
1
- "use strict";const t=require("./element-CJ_QKaki.cjs"),a=require("./if-defined-Bc9-_I01.cjs"),l=require("./state-DSjcvzDN.cjs"),h=require("./ref-BFa5Utho.cjs"),c=require("./class-map-C_erArZz.cjs"),d=require("./input-element-KUsQQ-1d.cjs"),x=require("./pkt-slot-controller-BzddBp7z.cjs");require("./input-wrapper-B-Qseywc.cjs");require("./icon-BGuizDwk.cjs");var $=Object.defineProperty,f=Object.getOwnPropertyDescriptor,r=(u,i,s,n)=>{for(var e=n>1?void 0:n?f(i,s):i,o=u.length-1,p;o>=0;o--)(p=u[o])&&(e=(n?p(i,s,e):p(e))||e);return n&&e&&$(i,s,e),e};exports.PktTextinput=class extends d.PktInputElement{constructor(){super(),this.inputRef=h.e(),this.helptextSlot=h.e(),this.value="",this.type="text",this.size=null,this.autocomplete=null,this.iconNameRight=null,this.prefix=null,this.suffix=null,this.omitSearchIcon=!1,this.counterCurrent=0,this.slotController=new x.PktSlotController(this,this.helptextSlot)}attributeChangedCallback(i,s,n){i==="value"&&this.value!==s&&(this.counterCurrent=n?n.length:0,this.valueChanged(n,s)),super.attributeChangedCallback(i,s,n)}updated(i){var s;super.updated(i),i.has("value")&&(this.counterCurrent=((s=this.value)==null?void 0:s.length)||0,this.valueChanged(this.value,i.get("value"))),i.has("id")&&!this.name&&this.id&&(this.name=this.id)}render(){const i=this.type==="search"&&!this.iconNameRight&&!this.omitSearchIcon,s=c.e({"pkt-input":!0,"pkt-input--fullwidth":this.fullwidth,"pkt-input--counter-error":this.counter&&this.counterMaxLength&&this.value.length&&this.value.length>this.counterMaxLength}),n=this.ariaLabelledby||`${this.id}-input-label`;return t.x`
1
+ "use strict";const t=require("./element-CJ_QKaki.cjs"),a=require("./if-defined-Bc9-_I01.cjs"),l=require("./state-DSjcvzDN.cjs"),h=require("./ref-BFa5Utho.cjs"),c=require("./class-map-C_erArZz.cjs"),d=require("./input-element-BmXkhljw.cjs"),x=require("./pkt-slot-controller-BzddBp7z.cjs");require("./input-wrapper-B-Qseywc.cjs");require("./icon-BGuizDwk.cjs");var $=Object.defineProperty,f=Object.getOwnPropertyDescriptor,r=(u,i,s,n)=>{for(var e=n>1?void 0:n?f(i,s):i,o=u.length-1,p;o>=0;o--)(p=u[o])&&(e=(n?p(i,s,e):p(e))||e);return n&&e&&$(i,s,e),e};exports.PktTextinput=class extends d.PktInputElement{constructor(){super(),this.inputRef=h.e(),this.helptextSlot=h.e(),this.value="",this.type="text",this.size=null,this.autocomplete=null,this.iconNameRight=null,this.prefix=null,this.suffix=null,this.omitSearchIcon=!1,this.counterCurrent=0,this.slotController=new x.PktSlotController(this,this.helptextSlot)}attributeChangedCallback(i,s,n){i==="value"&&this.value!==s&&(this.counterCurrent=n?n.length:0,this.valueChanged(n,s)),super.attributeChangedCallback(i,s,n)}updated(i){var s;super.updated(i),i.has("value")&&(this.counterCurrent=((s=this.value)==null?void 0:s.length)||0,this.valueChanged(this.value,i.get("value"))),i.has("id")&&!this.name&&this.id&&(this.name=this.id)}render(){const i=this.type==="search"&&!this.iconNameRight&&!this.omitSearchIcon,s=c.e({"pkt-input":!0,"pkt-input--fullwidth":this.fullwidth,"pkt-input--counter-error":this.counter&&this.counterMaxLength&&this.value.length&&this.value.length>this.counterMaxLength}),n=this.ariaLabelledby||`${this.id}-input-label`;return t.x`
2
2
  <pkt-input-wrapper
3
3
  label="${this.label}"
4
4
  ?counter=${this.counter}
@@ -9,7 +9,7 @@
9
9
  ?optionalTag=${this.optionalTag}
10
10
  ?required=${this.required}
11
11
  ?requiredTag=${this.requiredTag}
12
- ?useWrapper=${this.useWrapper}
12
+ useWrapper=${this.useWrapper}
13
13
  .ariaDescribedBy=${this.ariaDescribedBy}
14
14
  .counterCurrent=${this.counterCurrent}
15
15
  .counterMaxLength=${this.counterMaxLength}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oslokommune/punkt-elements",
3
- "version": "13.18.1",
3
+ "version": "13.18.3",
4
4
  "description": "Komponentbiblioteket til Punkt, et designsystem laget av Oslo Origo",
5
5
  "homepage": "https://punkt.oslo.kommune.no",
6
6
  "author": "Team Designsystem, Oslo Origo",
@@ -79,5 +79,5 @@
79
79
  "url": "https://github.com/oslokommune/punkt/issues"
80
80
  },
81
81
  "license": "MIT",
82
- "gitHead": "3a29f3b3de9cced943ed4cd7de3d6c8a02e75040"
82
+ "gitHead": "b50b43c71111d884d75d826b789dc97bf0600e70"
83
83
  }
@@ -276,7 +276,7 @@ export class PktCombobox extends PktInputElement implements IPktCombobox {
276
276
  ?requiredTag=${this.requiredTag}
277
277
  .requiredText=${this.requiredText}
278
278
  .tagText=${this.tagText}
279
- ?useWrapper=${this.useWrapper}
279
+ useWrapper=${this.useWrapper}
280
280
  .forId=${this.allowUserInput || this.typeahead ? this.id + '-input' : this.id + '-arrow'}
281
281
  class="pkt-combobox__wrapper"
282
282
  @labelClick=${this.handleInputClick}
@@ -470,7 +470,7 @@ export class PktDatepicker extends PktInputElement<Props> {
470
470
  ?required=${this.required}
471
471
  ?optionalTag=${this.optionalTag}
472
472
  ?requiredTag=${this.requiredTag}
473
- ?useWrapper=${this.useWrapper}
473
+ useWrapper=${this.useWrapper}
474
474
  .optionalText=${this.optionalText}
475
475
  .requiredText=${this.requiredText}
476
476
  .tagText=${this.tagText}
@@ -229,7 +229,7 @@ export class PktSelect extends PktInputElement implements IPktSelect {
229
229
  ?inline=${this.inline}
230
230
  ?optionalTag=${this.optionalTag}
231
231
  ?requiredTag=${this.requiredTag}
232
- ?useWrapper=${this.useWrapper}
232
+ useWrapper=${this.useWrapper}
233
233
  ariaDescribedBy=${ifDefined(this.ariaDescribedBy)}
234
234
  class="pkt-select"
235
235
  errorMessage=${ifDefined(this.errorMessage)}
@@ -84,11 +84,11 @@ export class PktTag extends PktElement<IPktTag> implements IPktTag {
84
84
  private close = (event: MouseEvent) => {
85
85
  this._isClosed = true
86
86
  this.dispatchEvent(
87
- new CustomEvent('close', { detail: { origin: event }, bubbles: true, composed: true }),
87
+ new CustomEvent('close', { detail: { origin: event }, bubbles: false, composed: true }),
88
88
  )
89
89
  // Historical support of old Vue implementations…
90
90
  this.dispatchEvent(
91
- new CustomEvent('on-close', { detail: { origin: event }, bubbles: true, composed: true }),
91
+ new CustomEvent('on-close', { detail: { origin: event }, bubbles: false, composed: true }),
92
92
  )
93
93
  }
94
94
 
@@ -69,7 +69,7 @@ export class PktTextarea extends PktInputElement<Props> {
69
69
  ?optionalTag=${this.optionalTag}
70
70
  ?required=${this.required}
71
71
  ?requiredTag=${this.requiredTag}
72
- ?useWrapper=${this.useWrapper}
72
+ useWrapper=${this.useWrapper}
73
73
  .ariaDescribedBy=${this.ariaDescribedBy}
74
74
  .counterCurrent=${this.counterCurrent}
75
75
  .counterMaxLength=${this.counterMaxLength}
@@ -87,7 +87,7 @@ export class PktTextinput extends PktInputElement<Props> {
87
87
  ?optionalTag=${this.optionalTag}
88
88
  ?required=${this.required}
89
89
  ?requiredTag=${this.requiredTag}
90
- ?useWrapper=${this.useWrapper}
90
+ useWrapper=${this.useWrapper}
91
91
  .ariaDescribedBy=${this.ariaDescribedBy}
92
92
  .counterCurrent=${this.counterCurrent}
93
93
  .counterMaxLength=${this.counterMaxLength}