@oslokommune/punkt-elements 16.18.0 → 16.19.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/{accordion-CU2tJ5vn.js → accordion-BjYsEbSM.js} +19 -19
- package/dist/{accordion-DDZkjXFb.cjs → accordion-DaeWPWod.cjs} +5 -5
- package/dist/{alert-D_eXGOez.js → alert-BkzC5mVu.js} +22 -22
- package/dist/{alert-NyLr62jZ.cjs → alert-D_45dWPn.cjs} +6 -6
- package/dist/{async-directive-CaQiqjyV.js → async-directive-Cz6tcqge.js} +2 -2
- package/dist/async-directive-DO1QtVmf.cjs +1 -0
- package/dist/{backlink-CTu44BHn.js → backlink-BXAdgAte.js} +6 -6
- package/dist/{backlink-BsQ0Rmxj.cjs → backlink-C42-3OG3.cjs} +2 -2
- package/dist/{breadcrumbs-BNZ1L-0q.cjs → breadcrumbs-CkjeLh3U.cjs} +6 -6
- package/dist/{breadcrumbs-DPnoURvl.js → breadcrumbs-Dkb9TxMp.js} +15 -15
- package/dist/{button-ZYlrRRfu.js → button-CR-KWhTT.js} +21 -21
- package/dist/{button-DsGvcLIn.cjs → button-Dwv11n6R.cjs} +7 -7
- package/dist/{calendar-CDDVoUby.cjs → calendar-Buvxe4l_.cjs} +11 -11
- package/dist/{calendar-VOqO5um6.js → calendar-DAq6iJdx.js} +50 -50
- package/dist/{card-B4oDGIRP.js → card-5PydU247.js} +43 -43
- package/dist/{card-DZuZy0ay.cjs → card-C__IlsUa.cjs} +26 -26
- package/dist/{checkbox-CF5mSBR5.js → checkbox-CC1X7fw4.js} +23 -23
- package/dist/{checkbox-BerAYcfK.cjs → checkbox-DzMc0AJX.cjs} +10 -10
- package/dist/class-map-B8Ja0q7n.cjs +1 -0
- package/dist/{class-map-C8HuhNzZ.js → class-map-DH9hlJny.js} +7 -8
- package/dist/{combobox-BDYoPZmg.js → combobox-D-DY7YcW.js} +42 -42
- package/dist/{combobox-Ct9gCFa1.cjs → combobox-x4tBGP3F.cjs} +17 -17
- package/dist/components/heading/heading.d.ts +5 -8
- package/dist/{consent-BME_rQ2w.cjs → consent-BB3g_ByO.cjs} +3 -3
- package/dist/{consent-1IUuWZAh.js → consent-Y14WZ0JS.js} +8 -8
- package/dist/{datepicker-ByqXCpCd.cjs → datepicker-BFI-3stE.cjs} +20 -20
- package/dist/{datepicker-BGpoabCM.js → datepicker-CRk7aiwH.js} +57 -57
- package/dist/{directive-helpers-Dkv2gKgs.js → directive-helpers-Cep_4cpj.js} +1 -1
- package/dist/{directive-helpers-D1QSxY17.cjs → directive-helpers-f36YZFOG.cjs} +1 -1
- package/dist/element-CXAtr6Gu.cjs +2 -0
- package/dist/{element-cZ85T_aa.js → element-CduG0XyF.js} +47 -23
- package/dist/{element-with-slot-4J2o3SeU.js → element-with-slot-BVj9MXzi.js} +5 -6
- package/dist/element-with-slot-Cmxb9h4H.cjs +1 -0
- package/dist/{fileupload-B6W7qOQT.js → fileupload-C8muj8qd.js} +149 -149
- package/dist/{fileupload-a2OL3dzG.cjs → fileupload-YtsrgQTY.cjs} +40 -40
- package/dist/{header-BZFSan0_.cjs → header-CjBip0zj.cjs} +57 -57
- package/dist/{header-BgVpJMHQ.js → header-DONTGbD9.js} +130 -130
- package/dist/{header-menu-BXzVVOHq.js → header-menu-BU-ylGrJ.js} +45 -45
- package/dist/{header-menu-BLngov1D.cjs → header-menu-CnW7nzmF.cjs} +24 -24
- package/dist/heading-3o4Dk0Wn.js +80 -0
- package/dist/heading-C40-NX0r.cjs +1 -0
- package/dist/{helptext-BeU-enix.js → helptext-C2aQBBo_.js} +12 -12
- package/dist/{helptext-DWMFqMnV.cjs → helptext-DNLg43eI.cjs} +4 -4
- package/dist/icon-Dw6I0HDV.cjs +1 -0
- package/dist/{icon-CZQkrK6B.js → icon-LaKyBKON.js} +18 -19
- package/dist/if-defined-LTjAScFG.cjs +1 -0
- package/dist/{if-defined-Cjj8qN-Z.js → if-defined-VShASPdu.js} +1 -1
- package/dist/{input-element-D0egtEnr.cjs → input-element-BHQVt4Q9.cjs} +1 -1
- package/dist/{input-element-B1ciW1N2.js → input-element-BrmkXIXi.js} +30 -30
- package/dist/{input-wrapper-oYcbCFow.js → input-wrapper-B6WowlWG.js} +33 -33
- package/dist/{input-wrapper-Y98KV-sy.cjs → input-wrapper-Dhkt20WW.cjs} +17 -17
- package/dist/{link-BMMIjg50.cjs → link-B5ur0Rym.cjs} +4 -4
- package/dist/{link-CT0LB3S7.js → link-ClUNY__5.js} +13 -13
- package/dist/linkcard-BIcCW-qw.cjs +13 -0
- package/dist/{linkcard-Bz5zb69P.js → linkcard-DNJm5FvA.js} +15 -15
- package/dist/{listbox-0NHJvNjz.js → listbox-DXMIBv3y.js} +35 -35
- package/dist/{listbox-CcThiNBY.cjs → listbox-DbEobJNx.cjs} +14 -14
- package/dist/{loader-8T6M0FCQ.cjs → loader-Uap9qDsV.cjs} +5 -5
- package/dist/{loader-Cbrc4FFx.js → loader-gKdQpOOQ.js} +12 -12
- package/dist/{messagebox-C6LHT78_.cjs → messagebox-BqBxXK8c.cjs} +5 -5
- package/dist/{messagebox-TKKUVTo4.js → messagebox-XRFecqyS.js} +15 -15
- package/dist/{modal-BVHH8koz.js → modal-CWgeT-RP.js} +19 -19
- package/dist/{modal-CRzbtqL3.cjs → modal-CrYHKOmr.cjs} +8 -8
- package/dist/pkt-accordion.cjs +1 -1
- package/dist/pkt-accordion.js +1 -1
- package/dist/pkt-alert.cjs +1 -1
- package/dist/pkt-alert.js +1 -1
- package/dist/pkt-backlink.cjs +1 -1
- package/dist/pkt-backlink.js +1 -1
- package/dist/pkt-breadcrumbs.cjs +1 -1
- package/dist/pkt-breadcrumbs.js +1 -1
- package/dist/pkt-button.cjs +1 -1
- package/dist/pkt-button.js +1 -1
- package/dist/pkt-calendar.cjs +1 -1
- package/dist/pkt-calendar.js +1 -1
- package/dist/pkt-card.cjs +1 -1
- package/dist/pkt-card.js +1 -1
- package/dist/pkt-checkbox.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-fileupload.cjs +1 -1
- package/dist/pkt-fileupload.js +1 -1
- package/dist/pkt-header-menu.cjs +1 -1
- package/dist/pkt-header-menu.js +1 -1
- package/dist/pkt-header.cjs +1 -1
- package/dist/pkt-header.js +1 -1
- package/dist/pkt-heading.cjs +1 -1
- package/dist/pkt-heading.js +1 -1
- package/dist/pkt-helptext.cjs +1 -1
- package/dist/pkt-helptext.js +1 -1
- package/dist/pkt-icon.cjs +1 -1
- package/dist/pkt-icon.js +1 -1
- package/dist/pkt-index.cjs +1 -1
- package/dist/pkt-index.js +32 -32
- package/dist/pkt-input-wrapper.cjs +1 -1
- package/dist/pkt-input-wrapper.js +1 -1
- package/dist/pkt-link.cjs +1 -1
- package/dist/pkt-link.js +1 -1
- package/dist/pkt-linkcard.cjs +1 -1
- package/dist/pkt-linkcard.js +1 -1
- package/dist/pkt-listbox.cjs +1 -1
- package/dist/pkt-listbox.js +1 -1
- package/dist/pkt-loader.cjs +1 -1
- package/dist/pkt-loader.js +1 -1
- package/dist/pkt-messagebox.cjs +1 -1
- package/dist/pkt-messagebox.js +1 -1
- package/dist/pkt-modal.cjs +1 -1
- package/dist/pkt-modal.js +1 -1
- package/dist/{pkt-options-controller-CCB15L_G.js → pkt-options-controller-BTNtjEIS.js} +1 -1
- package/dist/{pkt-options-controller-CeAQ-D-i.cjs → pkt-options-controller-CBM8xHwR.cjs} +1 -1
- package/dist/pkt-progressbar.cjs +1 -1
- package/dist/pkt-progressbar.js +1 -1
- package/dist/pkt-radiobutton.cjs +1 -1
- package/dist/pkt-radiobutton.js +1 -1
- package/dist/pkt-searchinput.cjs +1 -1
- package/dist/pkt-searchinput.js +1 -1
- package/dist/pkt-select.cjs +1 -1
- package/dist/pkt-select.js +1 -1
- package/dist/pkt-tabs.cjs +1 -1
- package/dist/pkt-tabs.js +1 -1
- package/dist/pkt-tag.cjs +1 -1
- package/dist/pkt-tag.js +1 -1
- package/dist/pkt-textarea.cjs +1 -1
- package/dist/pkt-textarea.js +1 -1
- package/dist/pkt-textinput.cjs +1 -1
- package/dist/pkt-textinput.js +1 -1
- package/dist/pkt-timepicker.cjs +1 -1
- package/dist/pkt-timepicker.js +1 -1
- package/dist/{progressbar-C-5oESiB.js → progressbar-B0P_vmGD.js} +23 -24
- package/dist/progressbar-DADdvDl5.cjs +17 -0
- package/dist/{radiobutton-B1Xg6XzP.cjs → radiobutton-BfURufrZ.cjs} +8 -8
- package/dist/{radiobutton-BAn1V_mQ.js → radiobutton-C6zERHoy.js} +20 -20
- package/dist/{ref-RS8Uv6uC.js → ref-BgoHEsEt.js} +7 -8
- package/dist/ref-CBdWMlde.cjs +1 -0
- package/dist/{repeat-DV1O43YU.js → repeat-CKIii8Mi.js} +15 -16
- package/dist/repeat-CRRgmzVn.cjs +1 -0
- package/dist/{searchinput-DUgZb_zm.cjs → searchinput-BrxfRzez.cjs} +13 -13
- package/dist/{searchinput-C9FP89qD.js → searchinput-fPvXHu2O.js} +31 -31
- package/dist/{select-DkKIW7zD.js → select-BIgFPp42.js} +13 -13
- package/dist/{select-DAs8kzN4.cjs → select-DzZHv6Bz.cjs} +3 -3
- package/dist/{tabs-ClI1XQDt.js → tabs-BJx6wwXD.js} +29 -29
- package/dist/{tabs-CN_RIMWg.cjs → tabs-DxQy8U-0.cjs} +7 -7
- package/dist/{tag-vgKH9B4k.cjs → tag-CBFz0R9N.cjs} +5 -5
- package/dist/{tag-DSZ-czu-.js → tag-CzlnHhho.js} +19 -19
- package/dist/textarea-M_S9WK7s.cjs +46 -0
- package/dist/{textarea-BfjI6d7Q.js → textarea-qHtkhelz.js} +24 -25
- package/dist/{textinput-DhoupEyI.js → textinput-CZrBM-Fj.js} +26 -26
- package/dist/{textinput-BM66vo5e.cjs → textinput-C_6kvf87.cjs} +12 -12
- package/dist/{timepicker-CtRGbypF.js → timepicker-O0iCeJyW.js} +51 -51
- package/dist/{timepicker-C4oRmmRd.cjs → timepicker-WiYLAncb.cjs} +20 -20
- package/package.json +2 -2
- package/src/components/card/card.ts +1 -1
- package/src/components/heading/heading.test.ts +79 -70
- package/src/components/heading/heading.ts +40 -78
- package/dist/async-directive-B9P1Qa0k.cjs +0 -1
- package/dist/class-map-CJ-msbHs.cjs +0 -1
- package/dist/directive-3THFsVew.js +0 -28
- package/dist/directive-CJ2giQBZ.cjs +0 -1
- package/dist/element-DjtxO-1r.cjs +0 -2
- package/dist/element-with-slot-CWoTGA1B.cjs +0 -1
- package/dist/heading-BxvE80bb.js +0 -73
- package/dist/heading-DRJTS27k.cjs +0 -1
- package/dist/icon-PbaC9uUg.cjs +0 -1
- package/dist/if-defined-XKOD_t_V.cjs +0 -1
- package/dist/linkcard-CupEMkvj.cjs +0 -13
- package/dist/progressbar-C0g830Tk.cjs +0 -17
- package/dist/ref-BaJ0mBT_.cjs +0 -1
- package/dist/repeat-DaDFvx86.cjs +0 -1
- package/dist/textarea-C7YiheLo.cjs +0 -46
- /package/dist/{booleanish-CRaKZ75t.js → booleanish-BmcOU-43.js} +0 -0
- /package/dist/{booleanish-B5EFqFpJ.cjs → booleanish-jJLlnr6-.cjs} +0 -0
- /package/dist/{classutils-z8YsPlOf.cjs → classutils-CVTzKF0J.cjs} +0 -0
- /package/dist/{classutils-DEL164Ur.js → classutils-lVbGcvjN.js} +0 -0
- /package/dist/{converters-Bffq_YDm.cjs → converters-C_66kHUN.cjs} +0 -0
- /package/dist/{converters-jauYkvNh.js → converters-DSQXaDQ_.js} +0 -0
- /package/dist/{dialog-polyfill.esm-B7W3teD0.js → dialog-polyfill.esm-0dVT8G1o.js} +0 -0
- /package/dist/{dialog-polyfill.esm-BnAQvMQO.cjs → dialog-polyfill.esm-CYs2AHP1.cjs} +0 -0
- /package/dist/{focus-modality-controller-pzSZkDkH.js → focus-modality-controller-CaUqYdk0.js} +0 -0
- /package/dist/{focus-modality-controller-BSZAQk8y.cjs → focus-modality-controller-wI5SR8wH.cjs} +0 -0
- /package/dist/{input-wrapper-CQGoyLdZ.cjs → input-wrapper-CYCCx8MP.cjs} +0 -0
- /package/dist/{input-wrapper-DwSsP39J.js → input-wrapper-kw2y6Jp_.js} +0 -0
- /package/dist/{utils-BOOZ0ppt.js → utils-CUqCKGvp.js} +0 -0
- /package/dist/{utils-CM67Oudc.cjs → utils-CjAbIttF.cjs} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`./element-DjtxO-1r.cjs`),t=require(`./element-with-slot-CWoTGA1B.cjs`),n=require(`./utils-CM67Oudc.cjs`),r=require(`./booleanish-B5EFqFpJ.cjs`),i=require(`./input-wrapper-CQGoyLdZ.cjs`);(function(e){"use strict";let t=new WeakMap,n=new WeakMap,r=new WeakMap,i=new WeakMap,a=new WeakMap,o=new WeakMap,s=new WeakMap,c=new WeakMap,l=new WeakMap,u=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,h=new WeakMap,g={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`},_=(e,t)=>{for(let n in g){t[n]=null;let r=null,i=g[n];Object.defineProperty(t,n,{get(){return r},set(n){r=n,e.isConnected?T(e,i,n):u.set(e,t)}})}};function v(e){let t=i.get(e),{form:n}=t;P(e,n,t),A(e,t.labels)}let y=(e,t=!1)=>{let n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(e){return i.has(e)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}}),r=n.nextNode(),a=!t||e.disabled;for(;r;)r.formDisabledCallback&&a&&E(r,e.disabled),r=n.nextNode()},b={attributes:!0,attributeFilter:[`disabled`,`name`]},x=z()?new MutationObserver(e=>{for(let t of e){let e=t.target;if(t.attributeName===`disabled`&&(e.constructor.formAssociated?E(e,e.hasAttribute(`disabled`)):e.localName===`fieldset`&&y(e)),t.attributeName===`name`&&e.constructor.formAssociated){let t=i.get(e),n=l.get(e);t.setFormValue(n)}}}):{};function S(e){e.forEach(e=>{let{addedNodes:t,removedNodes:n}=e,a=Array.from(t),o=Array.from(n);a.forEach(e=>{var t;if(i.has(e)&&e.constructor.formAssociated&&v(e),u.has(e)){let t=u.get(e);Object.keys(g).filter(e=>t[e]!==null).forEach(n=>{T(e,g[n],t[n])}),u.delete(e)}if(h.has(e)){let t=h.get(e);T(e,`internals-valid`,t.validity.valid.toString()),T(e,`internals-invalid`,(!t.validity.valid).toString()),T(e,`aria-invalid`,(!t.validity.valid).toString()),h.delete(e)}if(e.localName===`form`){let t=c.get(e),n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(e){return i.has(e)&&e.constructor.formAssociated&&!(t&&t.has(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}}),r=n.nextNode();for(;r;)v(r),r=n.nextNode()}e.localName===`fieldset`&&((t=x.observe)==null||t.call(x,e,b),y(e,!0))}),o.forEach(e=>{let t=i.get(e);t&&r.get(t)&&D(t),s.has(e)&&s.get(e).disconnect()})})}function C(e){e.forEach(e=>{let{removedNodes:t}=e;t.forEach(t=>{let n=p.get(e.target);i.has(t)&&R(t),n.disconnect()})})}let ee=e=>{var t;let n=new MutationObserver(C);(window==null?void 0:window.ShadyDOM)?.inUse&&e.mode&&e.host&&(e=e.host),(t=n.observe)==null||t.call(n,e,{childList:!0}),p.set(e,n)};z()&&new MutationObserver(S);let w={childList:!0,subtree:!0},T=(e,t,n)=>{e.getAttribute(t)!==n&&e.setAttribute(t,n)},E=(e,t)=>{e.toggleAttribute(`internals-disabled`,t),t?T(e,`aria-disabled`,`true`):e.removeAttribute(`aria-disabled`),e.formDisabledCallback&&e.formDisabledCallback.apply(e,[t])},D=e=>{r.get(e).forEach(e=>{e.remove()}),r.set(e,[])},O=(e,t)=>{let n=document.createElement(`input`);return n.type=`hidden`,n.name=e.getAttribute(`name`),e.after(n),r.get(t).push(n),n},k=(e,t)=>{var n;r.set(t,[]),(n=x.observe)==null||n.call(x,e,b)},A=(e,t)=>{if(t.length){Array.from(t).forEach(t=>t.addEventListener(`click`,e.click.bind(e)));let n=t[0].id;t[0].id||(n=`${t[0].htmlFor}_Label`,t[0].id=n),T(e,`aria-labelledby`,n)}},j=e=>{let t=Array.from(e.elements).filter(e=>!e.tagName.includes(`-`)&&e.validity).map(e=>e.validity.valid),n=c.get(e)||[],r=Array.from(n).filter(e=>e.isConnected).map(e=>i.get(e).validity.valid),a=[...t,...r].includes(!1);e.toggleAttribute(`internals-invalid`,a),e.toggleAttribute(`internals-valid`,!a)},M=e=>{j(F(e.target))},N=e=>{j(F(e.target))},te=e=>{let t=[`button[type=submit]`,`input[type=submit]`,`button:not([type])`].map(e=>`${e}:not([disabled])`).map(t=>`${t}:not([form])${e.id?`,${t}[form='${e.id}']`:``}`).join(`,`);e.addEventListener(`click`,n=>{if(n.target.closest(t)){let t=c.get(e);if(e.noValidate)return;t.size&&Array.from(t).reverse().map(e=>i.get(e).reportValidity()).includes(!1)&&n.preventDefault()}})},ne=e=>{let t=c.get(e.target);t&&t.size&&t.forEach(e=>{e.constructor.formAssociated&&e.formResetCallback&&e.formResetCallback.apply(e)})},P=(e,t,n)=>{if(t){let r=c.get(t);if(r)r.add(e);else{let n=new Set;n.add(e),c.set(t,n),te(t),t.addEventListener(`reset`,ne),t.addEventListener(`input`,M),t.addEventListener(`change`,N)}o.set(t,{ref:e,internals:n}),e.constructor.formAssociated&&e.formAssociatedCallback&&setTimeout(()=>{e.formAssociatedCallback.apply(e,[t])},0),j(t)}},F=e=>{let t=e.parentNode;return t&&t.tagName!==`FORM`&&(t=F(t)),t},I=(e,t,n=DOMException)=>{if(!e.constructor.formAssociated)throw new n(t)},L=(e,t,n)=>{let r=c.get(e);return r&&r.size&&r.forEach(e=>{i.get(e)[n]()||(t=!1)}),t},R=e=>{if(e.constructor.formAssociated){let t=i.get(e),{labels:n,form:r}=t;A(e,n),P(e,r,t)}};function z(){return typeof MutationObserver<`u`}class B{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)}}let re=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),ie=(e,t,n)=>(e.valid=V(t),Object.keys(t).forEach(n=>e[n]=t[n]),n&&j(n),e),V=e=>{let t=!0;for(let n in e)n!==`valid`&&e[n]!==!1&&(t=!1);return t},H=new WeakMap;function U(e,t){e.toggleAttribute(t,!0),e.part&&e.part.add(t)}class W extends Set{static get isPolyfilled(){return!0}constructor(e){if(super(),!e||!e.tagName||e.tagName.indexOf(`-`)===-1)throw TypeError(`Illegal constructor`);H.set(this,e)}add(e){if(!/^--/.test(e)||typeof e!=`string`)throw new DOMException(`Failed to execute 'add' on 'CustomStateSet': The specified value ${e} must start with '--'.`);let t=super.add(e),n=H.get(this),r=`state${e}`;return n.isConnected?U(n,r):setTimeout(()=>{U(n,r)}),t}clear(){for(let[e]of this.entries())this.delete(e);super.clear()}delete(e){let t=super.delete(e),n=H.get(this);return n.isConnected?(n.toggleAttribute(`state${e}`,!1),n.part&&n.part.remove(`state${e}`)):setTimeout(()=>{n.toggleAttribute(`state${e}`,!1),n.part&&n.part.remove(`state${e}`)}),t}}function G(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)}function K(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n}var q;class J{constructor(e){q.set(this,void 0),K(this,q,e,`f`);for(let t=0;t<e.length;t++){let n=e[t];this[t]=n,n.hasAttribute(`name`)&&(this[n.getAttribute(`name`)]=n)}Object.freeze(this)}get length(){return G(this,q,`f`).length}[(q=new WeakMap,Symbol.iterator)](){return G(this,q,`f`)[Symbol.iterator]()}item(e){return this[e]==null?null:this[e]}namedItem(e){return this[e]==null?null:this[e]}}function ae(){let e=HTMLFormElement.prototype.checkValidity;HTMLFormElement.prototype.checkValidity=n;let t=HTMLFormElement.prototype.reportValidity;HTMLFormElement.prototype.reportValidity=r;function n(...t){let n=e.apply(this,t);return L(this,n,`checkValidity`)}function r(...e){let n=t.apply(this,e);return L(this,n,`reportValidity`)}let{get:i}=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,`elements`);Object.defineProperty(HTMLFormElement.prototype,`elements`,{get(...e){let t=i.call(this,...e),n=Array.from(c.get(this)||[]);return n.length===0?t:new J(Array.from(t).concat(n).sort((e,t)=>e.compareDocumentPosition?e.compareDocumentPosition(t)&2?1:-1:0))}})}class Y{static get isPolyfilled(){return!0}constructor(e){if(!e||!e.tagName||e.tagName.indexOf(`-`)===-1)throw TypeError(`Illegal constructor`);let r=e.getRootNode(),a=new B;this.states=new W(e),t.set(this,e),n.set(this,a),i.set(e,this),_(e,this),k(e,this),Object.seal(this),r instanceof DocumentFragment&&ee(r)}checkValidity(){let e=t.get(this);if(I(e,`Failed to execute 'checkValidity' on 'ElementInternals': The target element is not a form-associated custom element.`),!this.willValidate)return!0;let r=n.get(this);if(!r.valid){let t=new Event(`invalid`,{bubbles:!1,cancelable:!0,composed:!1});e.dispatchEvent(t)}return r.valid}get form(){let e=t.get(this);I(e,`Failed to read the 'form' property from 'ElementInternals': The target element is not a form-associated custom element.`);let n;return e.constructor.formAssociated===!0&&(n=F(e)),n}get labels(){let e=t.get(this);I(e,`Failed to read the 'labels' property from 'ElementInternals': The target element is not a form-associated custom element.`);let n=e.getAttribute(`id`),r=e.getRootNode();return r&&n?r.querySelectorAll(`[for="${n}"]`):[]}reportValidity(){let e=t.get(this);if(I(e,`Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.`),!this.willValidate)return!0;let n=this.checkValidity(),r=f.get(this);if(r&&!e.constructor.formAssociated)throw new DOMException(`Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.`);return!n&&r&&(e.focus(),r.focus()),n}setFormValue(e){let n=t.get(this);if(I(n,`Failed to execute 'setFormValue' on 'ElementInternals': The target element is not a form-associated custom element.`),D(this),e!=null&&!(e instanceof FormData)){if(n.getAttribute(`name`)){let t=O(n,this);t.value=e}}else e!=null&&e instanceof FormData&&Array.from(e).reverse().forEach(([e,t])=>{if(typeof t==`string`){let r=O(n,this);r.name=e,r.value=t}});l.set(n,e)}setValidity(e,r,i){let o=t.get(this);if(I(o,`Failed to execute 'setValidity' on 'ElementInternals': The target element is not a form-associated custom element.`),!e)throw TypeError(`Failed to execute 'setValidity' on 'ElementInternals': 1 argument required, but only 0 present.`);f.set(this,i);let s=n.get(this),c={};for(let t in e)c[t]=e[t];Object.keys(c).length===0&&re(s);let l=Object.assign(Object.assign({},s),c);delete l.valid;let{valid:u}=ie(s,l,this.form);if(!u&&!r)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.`);a.set(this,u?``:r),o.isConnected?(o.toggleAttribute(`internals-invalid`,!u),o.toggleAttribute(`internals-valid`,u),T(o,`aria-invalid`,`${!u}`)):h.set(o,this)}get shadowRoot(){let e=t.get(this);return d.get(e)||null}get validationMessage(){return I(t.get(this),`Failed to read the 'validationMessage' property from 'ElementInternals': The target element is not a form-associated custom element.`),a.get(this)}get validity(){return I(t.get(this),`Failed to read the 'validity' property from 'ElementInternals': The target element is not a form-associated custom element.`),n.get(this)}get willValidate(){let e=t.get(this);return I(e,`Failed to read the 'willValidate' property from 'ElementInternals': The target element is not a form-associated custom element.`),!(e.disabled||e.hasAttribute(`disabled`)||e.hasAttribute(`readonly`))}}function oe(){if(typeof window>`u`||!window.ElementInternals||!HTMLElement.prototype.attachInternals)return!1;class e extends HTMLElement{constructor(){super(),this.internals=this.attachInternals()}}let t=`element-internals-feature-detection-${Math.random().toString(36).replace(/[^a-z]+/g,``)}`;customElements.define(t,e);let n=new e;return[`shadowRoot`,`form`,`willValidate`,`validity`,`validationMessage`,`labels`,`setFormValue`,`setValidity`,`checkValidity`,`reportValidity`].every(e=>e in n.internals)}let X=!1,Z=!1;function Q(e){Z||(Z=!0,window.CustomStateSet=W,e&&(HTMLElement.prototype.attachInternals=function(...t){let n=e.call(this,t);return n.states=new W(this),n}))}function $(e=!0){if(!X){if(X=!0,typeof window<`u`&&(window.ElementInternals=Y),typeof CustomElementRegistry<`u`){let e=CustomElementRegistry.prototype.define;CustomElementRegistry.prototype.define=function(t,n,r){if(n.formAssociated){let e=n.prototype.connectedCallback;n.prototype.connectedCallback=function(){m.has(this)||(m.set(this,!0),this.hasAttribute(`disabled`)&&E(this,!0)),e?.apply(this),R(this)}}e.call(this,t,n,r)}}if(typeof HTMLElement<`u`&&(HTMLElement.prototype.attachInternals=function(){if(!this.tagName)return{};if(this.tagName.indexOf(`-`)===-1)throw Error(`Failed to execute 'attachInternals' on 'HTMLElement': Unable to attach ElementInternals to non-custom elements.`);if(i.has(this))throw new DOMException(`DOMException: Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.`);return new Y(this)}),typeof Element<`u`){function e(...e){let n=t.apply(this,e);if(d.set(this,n),z()){let e=new MutationObserver(S);window.ShadyDOM?e.observe(this,w):e.observe(n,w),s.set(this,e)}return n}let t=Element.prototype.attachShadow;Element.prototype.attachShadow=e}z()&&typeof document<`u`&&new MutationObserver(S).observe(document.documentElement,w),typeof HTMLFormElement<`u`&&ae(),(e||typeof window<`u`&&!window.CustomStateSet)&&Q()}}return customElements.polyfillWrapFlushCallback||(oe()?typeof window<`u`&&!window.CustomStateSet&&Q(HTMLElement.prototype.attachInternals):$(!1)),e.forceCustomStateSetPolyfill=Q,e.forceElementInternalsPolyfill=$,Object.defineProperty(e,`__esModule`,{value:!0}),e})({});var a=`on`,o=`--checked`,s=`,`,c=class extends t.t{static get formAssociated(){return!0}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=n.n(),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=i.t.props.helptextDropdownButton.default,this.label=null,this.optionalText=e.i.forms.labels.optional,this.requiredText=e.i.forms.labels.required,this.tagText=null,this.dataTestid=``,this.touched=!1,this.internals=this.attachInternals()}manageValidity(t){if(!t){console.warn(`manageValidity called without valid input element`);return}this.required&&!this.value?this.internals.setValidity({valueMissing:!0},e.i.forms.messages.required,t):t.validity?.typeMismatch||t.validity?.badInput?this.internals.setValidity({typeMismatch:!0},e.i.forms.messages.invalid,t):t.validity?.patternMismatch?this.internals.setValidity({patternMismatch:!0},e.i.forms.messages.invalidPattern,t):t.validity?.tooShort||this.minlength&&this.minlength>0&&this.value.length<this.minlength?this.internals.setValidity({tooShort:!0},e.i.forms.messages.tooShort,t):t.validity?.tooLong||this.maxlength&&this.maxlength>0&&this.value.length>this.maxlength?this.internals.setValidity({tooLong:!0},e.i.forms.messages.tooLong,t):t.validity?.rangeUnderflow?this.internals.setValidity({rangeUnderflow:!0},this.min?e.i.forms.messages.rangeUnderflowMin.replace(`{min}`,this.min?.toString()):e.i.forms.messages.rangeUnderflow,t):t.validity?.stepMismatch?this.internals.setValidity({stepMismatch:!0},e.i.forms.messages.invalid,t):t.validity?.rangeOverflow?this.internals.setValidity({rangeOverflow:!0},this.max?e.i.forms.messages.rangeOverflowMax.replace(`{max}`,this.max?.toString()):e.i.forms.messages.rangeOverflow,t):t.validity?.customError?this.internals.setValidity({customError:!0},t.validationMessage,t):this.internals.setValidity({})}setFormValue(e){if(this.internals)if(Array.isArray(e)){let t=new FormData;e.forEach(e=>{t.append(this.name,e)}),this.internals.setFormValue(t)}else this.internals.setFormValue(e)}coordinateRadioGroup(){if(!this.form||!this.name||this.type!==`radio`)return;let e=`pkt-radiobutton[name="${this.name}"], input[type=radio][name="${this.name}"]`;this.form.querySelectorAll(e).forEach(e=>{if(e!==this&&e.getAttribute(`name`)===this.name&&e.getAttribute(`value`)!==this.value){let t=e;t.checked&&(t.checked=!1,t.internals&&(t.internals.setFormValue(null),t.internals.states?.delete(o)))}})}valueChecked(e){if(!this.touched)return;let t=this.internals.form||this.closest(`form`),n=t?new FormData(t):null;if(this.type===`radio`&&this.coordinateRadioGroup(),typeof e==`string`?(this.checked=e===`true`,this.internals.ariaChecked=String(e===`true`)):typeof e==`boolean`&&(this.checked=e,this.internals.ariaChecked=String(e)),this.checked){let e=(typeof this.value==`string`?this.value:``)||a;this.internals.setFormValue(e),n&&n.append(this.name,e),this.internals.states.add(o)}else this.internals.setFormValue(null),n&&n.delete(this.name),this.internals.states.delete(o);this.dispatchChangeEvents(this.checked),this.internals.reportValidity()}valueChanged(e,t){(t!==this.value||t!==this._value)&&(typeof e==`string`?((this.multiple||this.range)&&e.includes(s)&&(e=e.split(s)),this.value=e,this._value=Array.isArray(e)?e:[e]):Array.isArray(e)?(this.value=this.multiple||this.range?e:e[0],this._value=e):(this.value=``,this._value=[]),(!this.value||this.value.length===0)&&t&&t.length!==0?this.clearInputValue():this.value&&this.value.toString()!==t?.toString()&&this.onChange(this.value))}dispatchChangeEvents(e){this.dispatchEvent(new Event(`change`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`value-change`,{detail:e,bubbles:!0,composed:!0}))}clearInputValue(){let e=this.multiple||this.range?[]:``;this.value=e,this.setFormValue(e),this.dispatchChangeEvents(e)}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}))}normalizeValue(e){return(this.range||this.multiple)&&typeof e==`string`&&e.includes(s)?e.split(s):!this.multiple&&!this.range&&Array.isArray(e)?e[0]||``:e}validate(){this.inputRef?.value&&this.manageValidity(this.inputRef.value),this.inputRefTo?.value&&this.manageValidity(this.inputRefTo.value)}onChange(e){if(!this.touched){this.touched=!0,e&&this.setFormValue(e),this.validate();return}if(typeof e!=`string`&&!Array.isArray(e))return;let t=this.normalizeValue(e);this.setFormValue(t),this.validate(),this.dispatchChangeEvents(t)}formResetCallback(){if(this.touched=!1,this._options&&this._options.length&&this._options.forEach(e=>{`selected`in e&&(e.selected=!1)}),this.checked!==void 0)this.checked=!1,this.internals.ariaChecked=`false`,this.internals.setFormValue(``),this.inputRef?.value&&`checked`in this.inputRef.value&&(this.inputRef.value.checked=!1),this.valueChecked(this.checked);else{this.internals.setFormValue(``);let e=this.defaultValue||(this.multiple||this.range?[]:``);this.value=e,this._value=Array.isArray(e)?e:[e],this.valueChanged(this.value,null)}this.internals.ariaInvalid=`false`}updated(e){super.updated(e),e.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(e){if(super.firstUpdated(e),this.form||=this.internals.form||this.closest(`form`),this.value&&this.defaultValue===null&&(this.defaultValue=this.value),this.defaultValue!==null&&!this.value&&this.valueChanged(this.defaultValue,null),this.defaultChecked&&(this.internals.ariaChecked=`true`,this.checked=!0),this.required&&(this.internals.ariaRequired=`true`),this.disabled&&(this.internals.ariaDisabled=`true`),this.id&&!this.name&&(this.name=this.id),this.checked!==void 0){let e=this.checked===``||this.checked===`true`||this.checked===!0;this.internals.ariaChecked=String(e);let t=e?(typeof this.value==`string`?this.value:``)||a:null;this.internals.setFormValue(t)}else this.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))}};e.r([e.s({type:Boolean,reflect:!0})],c.prototype,`checked`,void 0),e.r([e.s({type:Boolean})],c.prototype,`defaultChecked`,void 0),e.r([e.s({type:Boolean})],c.prototype,`multiple`,void 0),e.r([e.s({type:Boolean})],c.prototype,`range`,void 0),e.r([e.s({type:String,reflect:!0})],c.prototype,`type`,void 0),e.r([e.s()],c.prototype,`defaultValue`,void 0),e.r([e.s({type:Boolean,reflect:!0})],c.prototype,`disabled`,void 0),e.r([e.s({type:Boolean,reflect:!0})],c.prototype,`readonly`,void 0),e.r([e.s({type:Boolean,reflect:!0})],c.prototype,`required`,void 0),e.r([e.s({reflect:!0,converter:{fromAttribute:e=>e,toAttribute:e=>e?.toString()??null}})],c.prototype,`max`,void 0),e.r([e.s({type:Number,reflect:!0})],c.prototype,`maxlength`,void 0),e.r([e.s({reflect:!0,converter:{fromAttribute:e=>e,toAttribute:e=>e?.toString()??null}})],c.prototype,`min`,void 0),e.r([e.s({type:Number,reflect:!0})],c.prototype,`minlength`,void 0),e.r([e.s({type:Number,reflect:!0})],c.prototype,`step`,void 0),e.r([e.s({type:String})],c.prototype,`ariaDescribedBy`,void 0),e.r([e.s({type:String})],c.prototype,`ariaLabelledby`,void 0),e.r([e.s({type:String,reflect:!0})],c.prototype,`name`,void 0),e.r([e.s({type:String,reflect:!0})],c.prototype,`pattern`,void 0),e.r([e.s({type:String,reflect:!0})],c.prototype,`placeholder`,void 0),e.r([e.s({type:String,reflect:!0})],c.prototype,`id`,void 0),e.r([e.s({type:Boolean})],c.prototype,`counter`,void 0),e.r([e.s({type:Boolean})],c.prototype,`hasError`,void 0),e.r([e.s({type:Boolean})],c.prototype,`inline`,void 0),e.r([e.s({type:Boolean})],c.prototype,`hasFieldset`,void 0),e.r([e.s({type:Boolean})],c.prototype,`optionalTag`,void 0),e.r([e.s({type:Boolean})],c.prototype,`requiredTag`,void 0),e.r([e.s({type:Boolean})],c.prototype,`skipForwardTestid`,void 0),e.r([e.s({type:Boolean,reflect:!0,converter:r.t})],c.prototype,`useWrapper`,void 0),e.r([e.s({type:Boolean,reflect:!0})],c.prototype,`fullwidth`,void 0),e.r([e.s({type:Number})],c.prototype,`counterMaxLength`,void 0),e.r([e.s({type:String})],c.prototype,`errorMessage`,void 0),e.r([e.s({type:String})],c.prototype,`helptext`,void 0),e.r([e.s({type:String})],c.prototype,`helptextDropdown`,void 0),e.r([e.s({type:String,reflect:!1})],c.prototype,`helptextDropdownButton`,void 0),e.r([e.s({type:String})],c.prototype,`label`,void 0),e.r([e.s({type:String,reflect:!1})],c.prototype,`optionalText`,void 0),e.r([e.s({type:String,reflect:!1})],c.prototype,`requiredText`,void 0),e.r([e.s({type:String,reflect:!1})],c.prototype,`tagText`,void 0),e.r([e.s({type:String,attribute:`data-testid`})],c.prototype,`dataTestid`,void 0),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return c}});
|
|
1
|
+
const e=require(`./element-CXAtr6Gu.cjs`),t=require(`./element-with-slot-Cmxb9h4H.cjs`),n=require(`./utils-CjAbIttF.cjs`),r=require(`./booleanish-jJLlnr6-.cjs`),i=require(`./input-wrapper-CYCCx8MP.cjs`);(function(e){"use strict";let t=new WeakMap,n=new WeakMap,r=new WeakMap,i=new WeakMap,a=new WeakMap,o=new WeakMap,s=new WeakMap,c=new WeakMap,l=new WeakMap,u=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,h=new WeakMap,g={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`},_=(e,t)=>{for(let n in g){t[n]=null;let r=null,i=g[n];Object.defineProperty(t,n,{get(){return r},set(n){r=n,e.isConnected?T(e,i,n):u.set(e,t)}})}};function v(e){let t=i.get(e),{form:n}=t;P(e,n,t),A(e,t.labels)}let y=(e,t=!1)=>{let n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(e){return i.has(e)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}}),r=n.nextNode(),a=!t||e.disabled;for(;r;)r.formDisabledCallback&&a&&E(r,e.disabled),r=n.nextNode()},b={attributes:!0,attributeFilter:[`disabled`,`name`]},x=z()?new MutationObserver(e=>{for(let t of e){let e=t.target;if(t.attributeName===`disabled`&&(e.constructor.formAssociated?E(e,e.hasAttribute(`disabled`)):e.localName===`fieldset`&&y(e)),t.attributeName===`name`&&e.constructor.formAssociated){let t=i.get(e),n=l.get(e);t.setFormValue(n)}}}):{};function S(e){e.forEach(e=>{let{addedNodes:t,removedNodes:n}=e,a=Array.from(t),o=Array.from(n);a.forEach(e=>{var t;if(i.has(e)&&e.constructor.formAssociated&&v(e),u.has(e)){let t=u.get(e);Object.keys(g).filter(e=>t[e]!==null).forEach(n=>{T(e,g[n],t[n])}),u.delete(e)}if(h.has(e)){let t=h.get(e);T(e,`internals-valid`,t.validity.valid.toString()),T(e,`internals-invalid`,(!t.validity.valid).toString()),T(e,`aria-invalid`,(!t.validity.valid).toString()),h.delete(e)}if(e.localName===`form`){let t=c.get(e),n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(e){return i.has(e)&&e.constructor.formAssociated&&!(t&&t.has(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}}),r=n.nextNode();for(;r;)v(r),r=n.nextNode()}e.localName===`fieldset`&&((t=x.observe)==null||t.call(x,e,b),y(e,!0))}),o.forEach(e=>{let t=i.get(e);t&&r.get(t)&&D(t),s.has(e)&&s.get(e).disconnect()})})}function C(e){e.forEach(e=>{let{removedNodes:t}=e;t.forEach(t=>{let n=p.get(e.target);i.has(t)&&R(t),n.disconnect()})})}let ee=e=>{var t;let n=new MutationObserver(C);(window==null?void 0:window.ShadyDOM)?.inUse&&e.mode&&e.host&&(e=e.host),(t=n.observe)==null||t.call(n,e,{childList:!0}),p.set(e,n)};z()&&new MutationObserver(S);let w={childList:!0,subtree:!0},T=(e,t,n)=>{e.getAttribute(t)!==n&&e.setAttribute(t,n)},E=(e,t)=>{e.toggleAttribute(`internals-disabled`,t),t?T(e,`aria-disabled`,`true`):e.removeAttribute(`aria-disabled`),e.formDisabledCallback&&e.formDisabledCallback.apply(e,[t])},D=e=>{r.get(e).forEach(e=>{e.remove()}),r.set(e,[])},O=(e,t)=>{let n=document.createElement(`input`);return n.type=`hidden`,n.name=e.getAttribute(`name`),e.after(n),r.get(t).push(n),n},k=(e,t)=>{var n;r.set(t,[]),(n=x.observe)==null||n.call(x,e,b)},A=(e,t)=>{if(t.length){Array.from(t).forEach(t=>t.addEventListener(`click`,e.click.bind(e)));let n=t[0].id;t[0].id||(n=`${t[0].htmlFor}_Label`,t[0].id=n),T(e,`aria-labelledby`,n)}},j=e=>{let t=Array.from(e.elements).filter(e=>!e.tagName.includes(`-`)&&e.validity).map(e=>e.validity.valid),n=c.get(e)||[],r=Array.from(n).filter(e=>e.isConnected).map(e=>i.get(e).validity.valid),a=[...t,...r].includes(!1);e.toggleAttribute(`internals-invalid`,a),e.toggleAttribute(`internals-valid`,!a)},M=e=>{j(F(e.target))},N=e=>{j(F(e.target))},te=e=>{let t=[`button[type=submit]`,`input[type=submit]`,`button:not([type])`].map(e=>`${e}:not([disabled])`).map(t=>`${t}:not([form])${e.id?`,${t}[form='${e.id}']`:``}`).join(`,`);e.addEventListener(`click`,n=>{if(n.target.closest(t)){let t=c.get(e);if(e.noValidate)return;t.size&&Array.from(t).reverse().map(e=>i.get(e).reportValidity()).includes(!1)&&n.preventDefault()}})},ne=e=>{let t=c.get(e.target);t&&t.size&&t.forEach(e=>{e.constructor.formAssociated&&e.formResetCallback&&e.formResetCallback.apply(e)})},P=(e,t,n)=>{if(t){let r=c.get(t);if(r)r.add(e);else{let n=new Set;n.add(e),c.set(t,n),te(t),t.addEventListener(`reset`,ne),t.addEventListener(`input`,M),t.addEventListener(`change`,N)}o.set(t,{ref:e,internals:n}),e.constructor.formAssociated&&e.formAssociatedCallback&&setTimeout(()=>{e.formAssociatedCallback.apply(e,[t])},0),j(t)}},F=e=>{let t=e.parentNode;return t&&t.tagName!==`FORM`&&(t=F(t)),t},I=(e,t,n=DOMException)=>{if(!e.constructor.formAssociated)throw new n(t)},L=(e,t,n)=>{let r=c.get(e);return r&&r.size&&r.forEach(e=>{i.get(e)[n]()||(t=!1)}),t},R=e=>{if(e.constructor.formAssociated){let t=i.get(e),{labels:n,form:r}=t;A(e,n),P(e,r,t)}};function z(){return typeof MutationObserver<`u`}class B{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)}}let re=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),ie=(e,t,n)=>(e.valid=V(t),Object.keys(t).forEach(n=>e[n]=t[n]),n&&j(n),e),V=e=>{let t=!0;for(let n in e)n!==`valid`&&e[n]!==!1&&(t=!1);return t},H=new WeakMap;function U(e,t){e.toggleAttribute(t,!0),e.part&&e.part.add(t)}class W extends Set{static get isPolyfilled(){return!0}constructor(e){if(super(),!e||!e.tagName||e.tagName.indexOf(`-`)===-1)throw TypeError(`Illegal constructor`);H.set(this,e)}add(e){if(!/^--/.test(e)||typeof e!=`string`)throw new DOMException(`Failed to execute 'add' on 'CustomStateSet': The specified value ${e} must start with '--'.`);let t=super.add(e),n=H.get(this),r=`state${e}`;return n.isConnected?U(n,r):setTimeout(()=>{U(n,r)}),t}clear(){for(let[e]of this.entries())this.delete(e);super.clear()}delete(e){let t=super.delete(e),n=H.get(this);return n.isConnected?(n.toggleAttribute(`state${e}`,!1),n.part&&n.part.remove(`state${e}`)):setTimeout(()=>{n.toggleAttribute(`state${e}`,!1),n.part&&n.part.remove(`state${e}`)}),t}}function G(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)}function K(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n}var q;class J{constructor(e){q.set(this,void 0),K(this,q,e,`f`);for(let t=0;t<e.length;t++){let n=e[t];this[t]=n,n.hasAttribute(`name`)&&(this[n.getAttribute(`name`)]=n)}Object.freeze(this)}get length(){return G(this,q,`f`).length}[(q=new WeakMap,Symbol.iterator)](){return G(this,q,`f`)[Symbol.iterator]()}item(e){return this[e]==null?null:this[e]}namedItem(e){return this[e]==null?null:this[e]}}function ae(){let e=HTMLFormElement.prototype.checkValidity;HTMLFormElement.prototype.checkValidity=n;let t=HTMLFormElement.prototype.reportValidity;HTMLFormElement.prototype.reportValidity=r;function n(...t){let n=e.apply(this,t);return L(this,n,`checkValidity`)}function r(...e){let n=t.apply(this,e);return L(this,n,`reportValidity`)}let{get:i}=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,`elements`);Object.defineProperty(HTMLFormElement.prototype,`elements`,{get(...e){let t=i.call(this,...e),n=Array.from(c.get(this)||[]);return n.length===0?t:new J(Array.from(t).concat(n).sort((e,t)=>e.compareDocumentPosition?e.compareDocumentPosition(t)&2?1:-1:0))}})}class Y{static get isPolyfilled(){return!0}constructor(e){if(!e||!e.tagName||e.tagName.indexOf(`-`)===-1)throw TypeError(`Illegal constructor`);let r=e.getRootNode(),a=new B;this.states=new W(e),t.set(this,e),n.set(this,a),i.set(e,this),_(e,this),k(e,this),Object.seal(this),r instanceof DocumentFragment&&ee(r)}checkValidity(){let e=t.get(this);if(I(e,`Failed to execute 'checkValidity' on 'ElementInternals': The target element is not a form-associated custom element.`),!this.willValidate)return!0;let r=n.get(this);if(!r.valid){let t=new Event(`invalid`,{bubbles:!1,cancelable:!0,composed:!1});e.dispatchEvent(t)}return r.valid}get form(){let e=t.get(this);I(e,`Failed to read the 'form' property from 'ElementInternals': The target element is not a form-associated custom element.`);let n;return e.constructor.formAssociated===!0&&(n=F(e)),n}get labels(){let e=t.get(this);I(e,`Failed to read the 'labels' property from 'ElementInternals': The target element is not a form-associated custom element.`);let n=e.getAttribute(`id`),r=e.getRootNode();return r&&n?r.querySelectorAll(`[for="${n}"]`):[]}reportValidity(){let e=t.get(this);if(I(e,`Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.`),!this.willValidate)return!0;let n=this.checkValidity(),r=f.get(this);if(r&&!e.constructor.formAssociated)throw new DOMException(`Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.`);return!n&&r&&(e.focus(),r.focus()),n}setFormValue(e){let n=t.get(this);if(I(n,`Failed to execute 'setFormValue' on 'ElementInternals': The target element is not a form-associated custom element.`),D(this),e!=null&&!(e instanceof FormData)){if(n.getAttribute(`name`)){let t=O(n,this);t.value=e}}else e!=null&&e instanceof FormData&&Array.from(e).reverse().forEach(([e,t])=>{if(typeof t==`string`){let r=O(n,this);r.name=e,r.value=t}});l.set(n,e)}setValidity(e,r,i){let o=t.get(this);if(I(o,`Failed to execute 'setValidity' on 'ElementInternals': The target element is not a form-associated custom element.`),!e)throw TypeError(`Failed to execute 'setValidity' on 'ElementInternals': 1 argument required, but only 0 present.`);f.set(this,i);let s=n.get(this),c={};for(let t in e)c[t]=e[t];Object.keys(c).length===0&&re(s);let l=Object.assign(Object.assign({},s),c);delete l.valid;let{valid:u}=ie(s,l,this.form);if(!u&&!r)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.`);a.set(this,u?``:r),o.isConnected?(o.toggleAttribute(`internals-invalid`,!u),o.toggleAttribute(`internals-valid`,u),T(o,`aria-invalid`,`${!u}`)):h.set(o,this)}get shadowRoot(){let e=t.get(this);return d.get(e)||null}get validationMessage(){return I(t.get(this),`Failed to read the 'validationMessage' property from 'ElementInternals': The target element is not a form-associated custom element.`),a.get(this)}get validity(){return I(t.get(this),`Failed to read the 'validity' property from 'ElementInternals': The target element is not a form-associated custom element.`),n.get(this)}get willValidate(){let e=t.get(this);return I(e,`Failed to read the 'willValidate' property from 'ElementInternals': The target element is not a form-associated custom element.`),!(e.disabled||e.hasAttribute(`disabled`)||e.hasAttribute(`readonly`))}}function oe(){if(typeof window>`u`||!window.ElementInternals||!HTMLElement.prototype.attachInternals)return!1;class e extends HTMLElement{constructor(){super(),this.internals=this.attachInternals()}}let t=`element-internals-feature-detection-${Math.random().toString(36).replace(/[^a-z]+/g,``)}`;customElements.define(t,e);let n=new e;return[`shadowRoot`,`form`,`willValidate`,`validity`,`validationMessage`,`labels`,`setFormValue`,`setValidity`,`checkValidity`,`reportValidity`].every(e=>e in n.internals)}let X=!1,Z=!1;function Q(e){Z||(Z=!0,window.CustomStateSet=W,e&&(HTMLElement.prototype.attachInternals=function(...t){let n=e.call(this,t);return n.states=new W(this),n}))}function $(e=!0){if(!X){if(X=!0,typeof window<`u`&&(window.ElementInternals=Y),typeof CustomElementRegistry<`u`){let e=CustomElementRegistry.prototype.define;CustomElementRegistry.prototype.define=function(t,n,r){if(n.formAssociated){let e=n.prototype.connectedCallback;n.prototype.connectedCallback=function(){m.has(this)||(m.set(this,!0),this.hasAttribute(`disabled`)&&E(this,!0)),e?.apply(this),R(this)}}e.call(this,t,n,r)}}if(typeof HTMLElement<`u`&&(HTMLElement.prototype.attachInternals=function(){if(!this.tagName)return{};if(this.tagName.indexOf(`-`)===-1)throw Error(`Failed to execute 'attachInternals' on 'HTMLElement': Unable to attach ElementInternals to non-custom elements.`);if(i.has(this))throw new DOMException(`DOMException: Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.`);return new Y(this)}),typeof Element<`u`){function e(...e){let n=t.apply(this,e);if(d.set(this,n),z()){let e=new MutationObserver(S);window.ShadyDOM?e.observe(this,w):e.observe(n,w),s.set(this,e)}return n}let t=Element.prototype.attachShadow;Element.prototype.attachShadow=e}z()&&typeof document<`u`&&new MutationObserver(S).observe(document.documentElement,w),typeof HTMLFormElement<`u`&&ae(),(e||typeof window<`u`&&!window.CustomStateSet)&&Q()}}return customElements.polyfillWrapFlushCallback||(oe()?typeof window<`u`&&!window.CustomStateSet&&Q(HTMLElement.prototype.attachInternals):$(!1)),e.forceCustomStateSetPolyfill=Q,e.forceElementInternalsPolyfill=$,Object.defineProperty(e,`__esModule`,{value:!0}),e})({});var a=`on`,o=`--checked`,s=`,`,c=class extends t.t{static get formAssociated(){return!0}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=n.n(),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=i.t.props.helptextDropdownButton.default,this.label=null,this.optionalText=e.r.forms.labels.optional,this.requiredText=e.r.forms.labels.required,this.tagText=null,this.dataTestid=``,this.touched=!1,this.internals=this.attachInternals()}manageValidity(t){if(!t){console.warn(`manageValidity called without valid input element`);return}this.required&&!this.value?this.internals.setValidity({valueMissing:!0},e.r.forms.messages.required,t):t.validity?.typeMismatch||t.validity?.badInput?this.internals.setValidity({typeMismatch:!0},e.r.forms.messages.invalid,t):t.validity?.patternMismatch?this.internals.setValidity({patternMismatch:!0},e.r.forms.messages.invalidPattern,t):t.validity?.tooShort||this.minlength&&this.minlength>0&&this.value.length<this.minlength?this.internals.setValidity({tooShort:!0},e.r.forms.messages.tooShort,t):t.validity?.tooLong||this.maxlength&&this.maxlength>0&&this.value.length>this.maxlength?this.internals.setValidity({tooLong:!0},e.r.forms.messages.tooLong,t):t.validity?.rangeUnderflow?this.internals.setValidity({rangeUnderflow:!0},this.min?e.r.forms.messages.rangeUnderflowMin.replace(`{min}`,this.min?.toString()):e.r.forms.messages.rangeUnderflow,t):t.validity?.stepMismatch?this.internals.setValidity({stepMismatch:!0},e.r.forms.messages.invalid,t):t.validity?.rangeOverflow?this.internals.setValidity({rangeOverflow:!0},this.max?e.r.forms.messages.rangeOverflowMax.replace(`{max}`,this.max?.toString()):e.r.forms.messages.rangeOverflow,t):t.validity?.customError?this.internals.setValidity({customError:!0},t.validationMessage,t):this.internals.setValidity({})}setFormValue(e){if(this.internals)if(Array.isArray(e)){let t=new FormData;e.forEach(e=>{t.append(this.name,e)}),this.internals.setFormValue(t)}else this.internals.setFormValue(e)}coordinateRadioGroup(){if(!this.form||!this.name||this.type!==`radio`)return;let e=`pkt-radiobutton[name="${this.name}"], input[type=radio][name="${this.name}"]`;this.form.querySelectorAll(e).forEach(e=>{if(e!==this&&e.getAttribute(`name`)===this.name&&e.getAttribute(`value`)!==this.value){let t=e;t.checked&&(t.checked=!1,t.internals&&(t.internals.setFormValue(null),t.internals.states?.delete(o)))}})}valueChecked(e){if(!this.touched)return;let t=this.internals.form||this.closest(`form`),n=t?new FormData(t):null;if(this.type===`radio`&&this.coordinateRadioGroup(),typeof e==`string`?(this.checked=e===`true`,this.internals.ariaChecked=String(e===`true`)):typeof e==`boolean`&&(this.checked=e,this.internals.ariaChecked=String(e)),this.checked){let e=(typeof this.value==`string`?this.value:``)||a;this.internals.setFormValue(e),n&&n.append(this.name,e),this.internals.states.add(o)}else this.internals.setFormValue(null),n&&n.delete(this.name),this.internals.states.delete(o);this.dispatchChangeEvents(this.checked),this.internals.reportValidity()}valueChanged(e,t){(t!==this.value||t!==this._value)&&(typeof e==`string`?((this.multiple||this.range)&&e.includes(s)&&(e=e.split(s)),this.value=e,this._value=Array.isArray(e)?e:[e]):Array.isArray(e)?(this.value=this.multiple||this.range?e:e[0],this._value=e):(this.value=``,this._value=[]),(!this.value||this.value.length===0)&&t&&t.length!==0?this.clearInputValue():this.value&&this.value.toString()!==t?.toString()&&this.onChange(this.value))}dispatchChangeEvents(e){this.dispatchEvent(new Event(`change`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`value-change`,{detail:e,bubbles:!0,composed:!0}))}clearInputValue(){let e=this.multiple||this.range?[]:``;this.value=e,this.setFormValue(e),this.dispatchChangeEvents(e)}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}))}normalizeValue(e){return(this.range||this.multiple)&&typeof e==`string`&&e.includes(s)?e.split(s):!this.multiple&&!this.range&&Array.isArray(e)?e[0]||``:e}validate(){this.inputRef?.value&&this.manageValidity(this.inputRef.value),this.inputRefTo?.value&&this.manageValidity(this.inputRefTo.value)}onChange(e){if(!this.touched){this.touched=!0,e&&this.setFormValue(e),this.validate();return}if(typeof e!=`string`&&!Array.isArray(e))return;let t=this.normalizeValue(e);this.setFormValue(t),this.validate(),this.dispatchChangeEvents(t)}formResetCallback(){if(this.touched=!1,this._options&&this._options.length&&this._options.forEach(e=>{`selected`in e&&(e.selected=!1)}),this.checked!==void 0)this.checked=!1,this.internals.ariaChecked=`false`,this.internals.setFormValue(``),this.inputRef?.value&&`checked`in this.inputRef.value&&(this.inputRef.value.checked=!1),this.valueChecked(this.checked);else{this.internals.setFormValue(``);let e=this.defaultValue||(this.multiple||this.range?[]:``);this.value=e,this._value=Array.isArray(e)?e:[e],this.valueChanged(this.value,null)}this.internals.ariaInvalid=`false`}updated(e){super.updated(e),e.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(e){if(super.firstUpdated(e),this.form||=this.internals.form||this.closest(`form`),this.value&&this.defaultValue===null&&(this.defaultValue=this.value),this.defaultValue!==null&&!this.value&&this.valueChanged(this.defaultValue,null),this.defaultChecked&&(this.internals.ariaChecked=`true`,this.checked=!0),this.required&&(this.internals.ariaRequired=`true`),this.disabled&&(this.internals.ariaDisabled=`true`),this.id&&!this.name&&(this.name=this.id),this.checked!==void 0){let e=this.checked===``||this.checked===`true`||this.checked===!0;this.internals.ariaChecked=String(e);let t=e?(typeof this.value==`string`?this.value:``)||a:null;this.internals.setFormValue(t)}else this.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))}};e.n([e.o({type:Boolean,reflect:!0})],c.prototype,`checked`,void 0),e.n([e.o({type:Boolean})],c.prototype,`defaultChecked`,void 0),e.n([e.o({type:Boolean})],c.prototype,`multiple`,void 0),e.n([e.o({type:Boolean})],c.prototype,`range`,void 0),e.n([e.o({type:String,reflect:!0})],c.prototype,`type`,void 0),e.n([e.o()],c.prototype,`defaultValue`,void 0),e.n([e.o({type:Boolean,reflect:!0})],c.prototype,`disabled`,void 0),e.n([e.o({type:Boolean,reflect:!0})],c.prototype,`readonly`,void 0),e.n([e.o({type:Boolean,reflect:!0})],c.prototype,`required`,void 0),e.n([e.o({reflect:!0,converter:{fromAttribute:e=>e,toAttribute:e=>e?.toString()??null}})],c.prototype,`max`,void 0),e.n([e.o({type:Number,reflect:!0})],c.prototype,`maxlength`,void 0),e.n([e.o({reflect:!0,converter:{fromAttribute:e=>e,toAttribute:e=>e?.toString()??null}})],c.prototype,`min`,void 0),e.n([e.o({type:Number,reflect:!0})],c.prototype,`minlength`,void 0),e.n([e.o({type:Number,reflect:!0})],c.prototype,`step`,void 0),e.n([e.o({type:String})],c.prototype,`ariaDescribedBy`,void 0),e.n([e.o({type:String})],c.prototype,`ariaLabelledby`,void 0),e.n([e.o({type:String,reflect:!0})],c.prototype,`name`,void 0),e.n([e.o({type:String,reflect:!0})],c.prototype,`pattern`,void 0),e.n([e.o({type:String,reflect:!0})],c.prototype,`placeholder`,void 0),e.n([e.o({type:String,reflect:!0})],c.prototype,`id`,void 0),e.n([e.o({type:Boolean})],c.prototype,`counter`,void 0),e.n([e.o({type:Boolean})],c.prototype,`hasError`,void 0),e.n([e.o({type:Boolean})],c.prototype,`inline`,void 0),e.n([e.o({type:Boolean})],c.prototype,`hasFieldset`,void 0),e.n([e.o({type:Boolean})],c.prototype,`optionalTag`,void 0),e.n([e.o({type:Boolean})],c.prototype,`requiredTag`,void 0),e.n([e.o({type:Boolean})],c.prototype,`skipForwardTestid`,void 0),e.n([e.o({type:Boolean,reflect:!0,converter:r.t})],c.prototype,`useWrapper`,void 0),e.n([e.o({type:Boolean,reflect:!0})],c.prototype,`fullwidth`,void 0),e.n([e.o({type:Number})],c.prototype,`counterMaxLength`,void 0),e.n([e.o({type:String})],c.prototype,`errorMessage`,void 0),e.n([e.o({type:String})],c.prototype,`helptext`,void 0),e.n([e.o({type:String})],c.prototype,`helptextDropdown`,void 0),e.n([e.o({type:String,reflect:!1})],c.prototype,`helptextDropdownButton`,void 0),e.n([e.o({type:String})],c.prototype,`label`,void 0),e.n([e.o({type:String,reflect:!1})],c.prototype,`optionalText`,void 0),e.n([e.o({type:String,reflect:!1})],c.prototype,`requiredText`,void 0),e.n([e.o({type:String,reflect:!1})],c.prototype,`tagText`,void 0),e.n([e.o({type:String,attribute:`data-testid`})],c.prototype,`dataTestid`,void 0),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return c}});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as r } from "./element-with-slot-
|
|
3
|
-
import { n as i } from "./utils-
|
|
4
|
-
import { t as a } from "./booleanish-
|
|
5
|
-
import { t as o } from "./input-wrapper-
|
|
1
|
+
import { n as e, o as t, r as n } from "./element-CduG0XyF.js";
|
|
2
|
+
import { t as r } from "./element-with-slot-BVj9MXzi.js";
|
|
3
|
+
import { n as i } from "./utils-CUqCKGvp.js";
|
|
4
|
+
import { t as a } from "./booleanish-BmcOU-43.js";
|
|
5
|
+
import { t as o } from "./input-wrapper-kw2y6Jp_.js";
|
|
6
6
|
//#region ../../node_modules/element-internals-polyfill/dist/index.js
|
|
7
7
|
(function(e) {
|
|
8
8
|
let t = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap(), r = /* @__PURE__ */ new WeakMap(), i = /* @__PURE__ */ new WeakMap(), a = /* @__PURE__ */ new WeakMap(), o = /* @__PURE__ */ new WeakMap(), s = /* @__PURE__ */ new WeakMap(), c = /* @__PURE__ */ new WeakMap(), l = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap(), d = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), p = /* @__PURE__ */ new WeakMap(), m = /* @__PURE__ */ new WeakMap(), h = /* @__PURE__ */ new WeakMap(), g = {
|
|
@@ -458,14 +458,14 @@ var s = "on", c = "--checked", l = ",", u = class extends r {
|
|
|
458
458
|
return !0;
|
|
459
459
|
}
|
|
460
460
|
constructor() {
|
|
461
|
-
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 = i(), 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 = o.props.helptextDropdownButton.default, this.label = null, this.optionalText =
|
|
461
|
+
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 = i(), 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 = o.props.helptextDropdownButton.default, this.label = null, this.optionalText = n.forms.labels.optional, this.requiredText = n.forms.labels.required, this.tagText = null, this.dataTestid = "", this.touched = !1, this.internals = this.attachInternals();
|
|
462
462
|
}
|
|
463
|
-
manageValidity(
|
|
464
|
-
if (!
|
|
463
|
+
manageValidity(e) {
|
|
464
|
+
if (!e) {
|
|
465
465
|
console.warn("manageValidity called without valid input element");
|
|
466
466
|
return;
|
|
467
467
|
}
|
|
468
|
-
this.required && !this.value ? this.internals.setValidity({ valueMissing: !0 },
|
|
468
|
+
this.required && !this.value ? this.internals.setValidity({ valueMissing: !0 }, n.forms.messages.required, e) : e.validity?.typeMismatch || e.validity?.badInput ? this.internals.setValidity({ typeMismatch: !0 }, n.forms.messages.invalid, e) : e.validity?.patternMismatch ? this.internals.setValidity({ patternMismatch: !0 }, n.forms.messages.invalidPattern, e) : e.validity?.tooShort || this.minlength && this.minlength > 0 && this.value.length < this.minlength ? this.internals.setValidity({ tooShort: !0 }, n.forms.messages.tooShort, e) : e.validity?.tooLong || this.maxlength && this.maxlength > 0 && this.value.length > this.maxlength ? this.internals.setValidity({ tooLong: !0 }, n.forms.messages.tooLong, e) : e.validity?.rangeUnderflow ? this.internals.setValidity({ rangeUnderflow: !0 }, this.min ? n.forms.messages.rangeUnderflowMin.replace("{min}", this.min?.toString()) : n.forms.messages.rangeUnderflow, e) : e.validity?.stepMismatch ? this.internals.setValidity({ stepMismatch: !0 }, n.forms.messages.invalid, e) : e.validity?.rangeOverflow ? this.internals.setValidity({ rangeOverflow: !0 }, this.max ? n.forms.messages.rangeOverflowMax.replace("{max}", this.max?.toString()) : n.forms.messages.rangeOverflow, e) : e.validity?.customError ? this.internals.setValidity({ customError: !0 }, e.validationMessage, e) : this.internals.setValidity({});
|
|
469
469
|
}
|
|
470
470
|
setFormValue(e) {
|
|
471
471
|
if (this.internals) if (Array.isArray(e)) {
|
|
@@ -568,74 +568,74 @@ var s = "on", c = "--checked", l = ",", u = class extends r {
|
|
|
568
568
|
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));
|
|
569
569
|
}
|
|
570
570
|
};
|
|
571
|
-
|
|
571
|
+
e([t({
|
|
572
572
|
type: Boolean,
|
|
573
573
|
reflect: !0
|
|
574
|
-
})], u.prototype, "checked", void 0),
|
|
574
|
+
})], u.prototype, "checked", void 0), e([t({ type: Boolean })], u.prototype, "defaultChecked", void 0), e([t({ type: Boolean })], u.prototype, "multiple", void 0), e([t({ type: Boolean })], u.prototype, "range", void 0), e([t({
|
|
575
575
|
type: String,
|
|
576
576
|
reflect: !0
|
|
577
|
-
})], u.prototype, "type", void 0),
|
|
577
|
+
})], u.prototype, "type", void 0), e([t()], u.prototype, "defaultValue", void 0), e([t({
|
|
578
578
|
type: Boolean,
|
|
579
579
|
reflect: !0
|
|
580
|
-
})], u.prototype, "disabled", void 0),
|
|
580
|
+
})], u.prototype, "disabled", void 0), e([t({
|
|
581
581
|
type: Boolean,
|
|
582
582
|
reflect: !0
|
|
583
|
-
})], u.prototype, "readonly", void 0),
|
|
583
|
+
})], u.prototype, "readonly", void 0), e([t({
|
|
584
584
|
type: Boolean,
|
|
585
585
|
reflect: !0
|
|
586
|
-
})], u.prototype, "required", void 0),
|
|
586
|
+
})], u.prototype, "required", void 0), e([t({
|
|
587
587
|
reflect: !0,
|
|
588
588
|
converter: {
|
|
589
589
|
fromAttribute: (e) => e,
|
|
590
590
|
toAttribute: (e) => e?.toString() ?? null
|
|
591
591
|
}
|
|
592
|
-
})], u.prototype, "max", void 0),
|
|
592
|
+
})], u.prototype, "max", void 0), e([t({
|
|
593
593
|
type: Number,
|
|
594
594
|
reflect: !0
|
|
595
|
-
})], u.prototype, "maxlength", void 0),
|
|
595
|
+
})], u.prototype, "maxlength", void 0), e([t({
|
|
596
596
|
reflect: !0,
|
|
597
597
|
converter: {
|
|
598
598
|
fromAttribute: (e) => e,
|
|
599
599
|
toAttribute: (e) => e?.toString() ?? null
|
|
600
600
|
}
|
|
601
|
-
})], u.prototype, "min", void 0),
|
|
601
|
+
})], u.prototype, "min", void 0), e([t({
|
|
602
602
|
type: Number,
|
|
603
603
|
reflect: !0
|
|
604
|
-
})], u.prototype, "minlength", void 0),
|
|
604
|
+
})], u.prototype, "minlength", void 0), e([t({
|
|
605
605
|
type: Number,
|
|
606
606
|
reflect: !0
|
|
607
|
-
})], u.prototype, "step", void 0),
|
|
607
|
+
})], u.prototype, "step", void 0), e([t({ type: String })], u.prototype, "ariaDescribedBy", void 0), e([t({ type: String })], u.prototype, "ariaLabelledby", void 0), e([t({
|
|
608
608
|
type: String,
|
|
609
609
|
reflect: !0
|
|
610
|
-
})], u.prototype, "name", void 0),
|
|
610
|
+
})], u.prototype, "name", void 0), e([t({
|
|
611
611
|
type: String,
|
|
612
612
|
reflect: !0
|
|
613
|
-
})], u.prototype, "pattern", void 0),
|
|
613
|
+
})], u.prototype, "pattern", void 0), e([t({
|
|
614
614
|
type: String,
|
|
615
615
|
reflect: !0
|
|
616
|
-
})], u.prototype, "placeholder", void 0),
|
|
616
|
+
})], u.prototype, "placeholder", void 0), e([t({
|
|
617
617
|
type: String,
|
|
618
618
|
reflect: !0
|
|
619
|
-
})], u.prototype, "id", void 0),
|
|
619
|
+
})], u.prototype, "id", void 0), e([t({ type: Boolean })], u.prototype, "counter", void 0), e([t({ type: Boolean })], u.prototype, "hasError", void 0), e([t({ type: Boolean })], u.prototype, "inline", void 0), e([t({ type: Boolean })], u.prototype, "hasFieldset", void 0), e([t({ type: Boolean })], u.prototype, "optionalTag", void 0), e([t({ type: Boolean })], u.prototype, "requiredTag", void 0), e([t({ type: Boolean })], u.prototype, "skipForwardTestid", void 0), e([t({
|
|
620
620
|
type: Boolean,
|
|
621
621
|
reflect: !0,
|
|
622
622
|
converter: a
|
|
623
|
-
})], u.prototype, "useWrapper", void 0),
|
|
623
|
+
})], u.prototype, "useWrapper", void 0), e([t({
|
|
624
624
|
type: Boolean,
|
|
625
625
|
reflect: !0
|
|
626
|
-
})], u.prototype, "fullwidth", void 0),
|
|
626
|
+
})], u.prototype, "fullwidth", void 0), e([t({ type: Number })], u.prototype, "counterMaxLength", void 0), e([t({ type: String })], u.prototype, "errorMessage", void 0), e([t({ type: String })], u.prototype, "helptext", void 0), e([t({ type: String })], u.prototype, "helptextDropdown", void 0), e([t({
|
|
627
627
|
type: String,
|
|
628
628
|
reflect: !1
|
|
629
|
-
})], u.prototype, "helptextDropdownButton", void 0),
|
|
629
|
+
})], u.prototype, "helptextDropdownButton", void 0), e([t({ type: String })], u.prototype, "label", void 0), e([t({
|
|
630
630
|
type: String,
|
|
631
631
|
reflect: !1
|
|
632
|
-
})], u.prototype, "optionalText", void 0),
|
|
632
|
+
})], u.prototype, "optionalText", void 0), e([t({
|
|
633
633
|
type: String,
|
|
634
634
|
reflect: !1
|
|
635
|
-
})], u.prototype, "requiredText", void 0),
|
|
635
|
+
})], u.prototype, "requiredText", void 0), e([t({
|
|
636
636
|
type: String,
|
|
637
637
|
reflect: !1
|
|
638
|
-
})], u.prototype, "tagText", void 0),
|
|
638
|
+
})], u.prototype, "tagText", void 0), e([t({
|
|
639
639
|
type: String,
|
|
640
640
|
attribute: "data-testid"
|
|
641
641
|
})], u.prototype, "dataTestid", void 0);
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as a } from "./class-map-
|
|
3
|
-
import { n as o, t as s } from "./element-with-slot-
|
|
4
|
-
import "./alert-
|
|
5
|
-
import { r as c } from "./icon-
|
|
6
|
-
import { t as l } from "./if-defined-
|
|
7
|
-
import { n as u } from "./utils-
|
|
8
|
-
import { t as d } from "./booleanish-
|
|
9
|
-
import { t as f } from "./input-wrapper-
|
|
10
|
-
import "./helptext-
|
|
11
|
-
import { t as p } from "./focus-modality-controller-
|
|
1
|
+
import { d as e, n as t, o as n, p as r, s as i } from "./element-CduG0XyF.js";
|
|
2
|
+
import { t as a } from "./class-map-DH9hlJny.js";
|
|
3
|
+
import { n as o, t as s } from "./element-with-slot-BVj9MXzi.js";
|
|
4
|
+
import "./alert-BkzC5mVu.js";
|
|
5
|
+
import { r as c } from "./icon-LaKyBKON.js";
|
|
6
|
+
import { t as l } from "./if-defined-VShASPdu.js";
|
|
7
|
+
import { n as u } from "./utils-CUqCKGvp.js";
|
|
8
|
+
import { t as d } from "./booleanish-BmcOU-43.js";
|
|
9
|
+
import { t as f } from "./input-wrapper-kw2y6Jp_.js";
|
|
10
|
+
import "./helptext-C2aQBBo_.js";
|
|
11
|
+
import { t as p } from "./focus-modality-controller-CaUqYdk0.js";
|
|
12
12
|
//#region src/components/input-wrapper/input-wrapper.ts
|
|
13
13
|
var m = class extends s {
|
|
14
14
|
constructor(...e) {
|
|
@@ -18,36 +18,36 @@ var m = class extends s {
|
|
|
18
18
|
super.updated(e);
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
|
-
let
|
|
21
|
+
let t = {
|
|
22
22
|
"pkt-inputwrapper": !0,
|
|
23
23
|
"pkt-inputwrapper--error": this.hasError,
|
|
24
24
|
"pkt-inputwrapper--disabled": this.disabled,
|
|
25
25
|
"pkt-inputwrapper--inline": this.inline
|
|
26
|
-
},
|
|
27
|
-
${this.tagText ?
|
|
28
|
-
${this.optionalTag ?
|
|
29
|
-
${this.requiredTag ?
|
|
30
|
-
`, u = () => this.useWrapper ? this.hasFieldset ?
|
|
26
|
+
}, n = "pkt-tag pkt-tag--small pkt-tag--thin-text", i = this.ariaDescribedby ? this.ariaDescribedby : this.helptext ? `${this.forId}-helptext` : e, s = () => r`
|
|
27
|
+
${this.tagText ? r`<span class=${n + " pkt-tag--gray"}>${this.tagText}</span>` : e}
|
|
28
|
+
${this.optionalTag ? r`<span class=${n + " pkt-tag--blue-light"}>${this.optionalText}</span>` : e}
|
|
29
|
+
${this.requiredTag ? r`<span class=${n + " pkt-tag--beige"}>${this.requiredText}</span>` : e}
|
|
30
|
+
`, u = () => this.useWrapper ? this.hasFieldset ? r`<legend
|
|
31
31
|
class="pkt-inputwrapper__legend"
|
|
32
32
|
id="${this.forId}-label"
|
|
33
33
|
@click=${this.handleLabelClick}
|
|
34
34
|
>
|
|
35
35
|
${this.label} ${s()}
|
|
36
|
-
</legend>` :
|
|
36
|
+
</legend>` : r`<label
|
|
37
37
|
class="pkt-inputwrapper__label"
|
|
38
38
|
for="${this.forId}"
|
|
39
39
|
aria-describedby="${i}"
|
|
40
40
|
id="${this.forId}-label"
|
|
41
41
|
@click=${this.handleLabelClick}
|
|
42
42
|
>${this.label}${s()}</label
|
|
43
|
-
>` :
|
|
43
|
+
>` : r`<label
|
|
44
44
|
for="${this.forId}"
|
|
45
45
|
class="pkt-sr-only"
|
|
46
46
|
aria-describedby="${i}"
|
|
47
47
|
id="${this.forId}-label"
|
|
48
48
|
>
|
|
49
49
|
${this.label}
|
|
50
|
-
</label>`, d = () =>
|
|
50
|
+
</label>`, d = () => r`
|
|
51
51
|
<pkt-helptext
|
|
52
52
|
class="${l(this.useWrapper ? void 0 : "pkt-hide")}"
|
|
53
53
|
.forId=${this.forId}
|
|
@@ -59,10 +59,10 @@ var m = class extends s {
|
|
|
59
59
|
}}
|
|
60
60
|
>${o(this, "helptext")}</pkt-helptext
|
|
61
61
|
>
|
|
62
|
-
`, p = () => this.counter ?
|
|
63
|
-
${this.counterError ? this.counterError :
|
|
64
|
-
${this.counterMaxLength ? `/${this.counterMaxLength}` :
|
|
65
|
-
</div>` :
|
|
62
|
+
`, p = () => this.counter ? r`<div class="pkt-input__counter" aria-live="polite" aria-atomic="true">
|
|
63
|
+
${this.counterError ? this.counterError : e} ${this.counterCurrent || 0}
|
|
64
|
+
${this.counterMaxLength ? `/${this.counterMaxLength}` : e}
|
|
65
|
+
</div>` : e, m = () => this.hasError && this.errorMessage ? r`<pkt-alert
|
|
66
66
|
skin="error"
|
|
67
67
|
compact
|
|
68
68
|
id=${`${this.forId}-error`}
|
|
@@ -70,17 +70,17 @@ var m = class extends s {
|
|
|
70
70
|
aria-atomic="true"
|
|
71
71
|
>
|
|
72
72
|
${c(this.errorMessage)}
|
|
73
|
-
</pkt-alert>` :
|
|
73
|
+
</pkt-alert>` : e, h = () => r`
|
|
74
74
|
${u()}
|
|
75
75
|
${d()}
|
|
76
|
-
${this.counterPosition === "top" ? p() :
|
|
76
|
+
${this.counterPosition === "top" ? p() : e}
|
|
77
77
|
<div class="pkt-contents">${o(this)}</div>
|
|
78
|
-
${this.counterPosition === "bottom" ? p() :
|
|
78
|
+
${this.counterPosition === "bottom" ? p() : e}
|
|
79
79
|
${m()}
|
|
80
80
|
`;
|
|
81
|
-
return
|
|
81
|
+
return r`<div class=${a(t)}>${this.hasFieldset ? r`<fieldset class="pkt-inputwrapper__fieldset" aria-describedby="${i}">
|
|
82
82
|
${h()}
|
|
83
|
-
</fieldset>` :
|
|
83
|
+
</fieldset>` : r`<div class="pkt-inputwrapper__fieldset">${h()}</div>`}</div> `;
|
|
84
84
|
}
|
|
85
85
|
toggleDropdown(e) {
|
|
86
86
|
this.dispatchEvent(new CustomEvent("toggleHelpText", {
|
|
@@ -96,19 +96,19 @@ var m = class extends s {
|
|
|
96
96
|
}));
|
|
97
97
|
}
|
|
98
98
|
};
|
|
99
|
-
|
|
99
|
+
t([n({ type: String })], m.prototype, "forId", void 0), t([n({ type: String })], m.prototype, "label", void 0), t([n({ type: String })], m.prototype, "helptext", void 0), t([n({ type: String })], m.prototype, "helptextDropdown", void 0), t([n({ type: String })], m.prototype, "helptextDropdownButton", void 0), t([n({ type: Boolean })], m.prototype, "counter", void 0), t([n({ type: Number })], m.prototype, "counterCurrent", void 0), t([n({ type: Number })], m.prototype, "counterMaxLength", void 0), t([n({ type: String })], m.prototype, "counterError", void 0), t([n({
|
|
100
100
|
type: String,
|
|
101
101
|
reflect: !1
|
|
102
|
-
})], m.prototype, "counterPosition", void 0),
|
|
102
|
+
})], m.prototype, "counterPosition", void 0), t([n({ type: Boolean })], m.prototype, "optionalTag", void 0), t([n({ type: String })], m.prototype, "optionalText", void 0), t([n({ type: Boolean })], m.prototype, "requiredTag", void 0), t([n({ type: String })], m.prototype, "requiredText", void 0), t([n({ type: String })], m.prototype, "tagText", void 0), t([n({ type: Boolean })], m.prototype, "hasError", void 0), t([n({ type: String })], m.prototype, "errorMessage", void 0), t([n({ type: Boolean })], m.prototype, "disabled", void 0), t([n({ type: Boolean })], m.prototype, "inline", void 0), t([n({ type: String })], m.prototype, "ariaDescribedby", void 0), t([n({ type: Boolean })], m.prototype, "hasFieldset", void 0), t([n({
|
|
103
103
|
type: String,
|
|
104
104
|
reflect: !0
|
|
105
|
-
})], m.prototype, "role", void 0),
|
|
105
|
+
})], m.prototype, "role", void 0), t([n({
|
|
106
106
|
type: Boolean,
|
|
107
107
|
reflect: !0,
|
|
108
108
|
converter: d
|
|
109
109
|
})], m.prototype, "useWrapper", void 0);
|
|
110
110
|
try {
|
|
111
|
-
|
|
111
|
+
i("pkt-input-wrapper")(m);
|
|
112
112
|
} catch {
|
|
113
113
|
console.warn("Forsøker å definere <pkt-input-wrapper>, men den er allerede definert");
|
|
114
114
|
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
const e=require(`./element-
|
|
2
|
-
${this.tagText?e.
|
|
3
|
-
${this.optionalTag?e.
|
|
4
|
-
${this.requiredTag?e.
|
|
5
|
-
`,u=()=>this.useWrapper?this.hasFieldset?e.
|
|
1
|
+
const e=require(`./element-CXAtr6Gu.cjs`),t=require(`./class-map-B8Ja0q7n.cjs`),n=require(`./element-with-slot-Cmxb9h4H.cjs`);require(`./alert-D_45dWPn.cjs`);const r=require(`./icon-Dw6I0HDV.cjs`),i=require(`./if-defined-LTjAScFG.cjs`),a=require(`./utils-CjAbIttF.cjs`),o=require(`./booleanish-jJLlnr6-.cjs`),s=require(`./input-wrapper-CYCCx8MP.cjs`);require(`./helptext-DNLg43eI.cjs`);const c=require(`./focus-modality-controller-wI5SR8wH.cjs`);var l=class extends n.t{constructor(...e){super(...e),this.forId=a.n(),this.label=``,this.helptext=null,this.helptextDropdown=null,this.helptextDropdownButton=null,this.counter=s.t.props.counter.default,this.counterCurrent=0,this.counterMaxLength=0,this.counterError=null,this.counterPosition=`bottom`,this.optionalTag=s.t.props.optionalTag.default,this.optionalText=s.t.props.optionalText.default,this.requiredTag=s.t.props.requiredTag.default,this.requiredText=s.t.props.requiredText.default,this.tagText=null,this.hasError=s.t.props.hasError.default,this.errorMessage=``,this.disabled=s.t.props.disabled.default,this.inline=s.t.props.inline.default,this.ariaDescribedby=void 0,this.hasFieldset=s.t.props.hasFieldset.default,this.role=`group`,this.useWrapper=s.t.props.useWrapper.default,this.focusModality=new c.t(this,`.pkt-inputwrapper`)}updated(e){super.updated(e)}render(){let a={"pkt-inputwrapper":!0,"pkt-inputwrapper--error":this.hasError,"pkt-inputwrapper--disabled":this.disabled,"pkt-inputwrapper--inline":this.inline},o=`pkt-tag pkt-tag--small pkt-tag--thin-text`,c=this.ariaDescribedby?this.ariaDescribedby:this.helptext?`${this.forId}-helptext`:e.d,l=()=>e.p`
|
|
2
|
+
${this.tagText?e.p`<span class=${o+` pkt-tag--gray`}>${this.tagText}</span>`:e.d}
|
|
3
|
+
${this.optionalTag?e.p`<span class=${o+` pkt-tag--blue-light`}>${this.optionalText}</span>`:e.d}
|
|
4
|
+
${this.requiredTag?e.p`<span class=${o+` pkt-tag--beige`}>${this.requiredText}</span>`:e.d}
|
|
5
|
+
`,u=()=>this.useWrapper?this.hasFieldset?e.p`<legend
|
|
6
6
|
class="pkt-inputwrapper__legend"
|
|
7
7
|
id="${this.forId}-label"
|
|
8
8
|
@click=${this.handleLabelClick}
|
|
9
9
|
>
|
|
10
10
|
${this.label} ${l()}
|
|
11
|
-
</legend>`:e.
|
|
11
|
+
</legend>`:e.p`<label
|
|
12
12
|
class="pkt-inputwrapper__label"
|
|
13
13
|
for="${this.forId}"
|
|
14
14
|
aria-describedby="${c}"
|
|
15
15
|
id="${this.forId}-label"
|
|
16
16
|
@click=${this.handleLabelClick}
|
|
17
17
|
>${this.label}${l()}</label
|
|
18
|
-
>`:e.
|
|
18
|
+
>`:e.p`<label
|
|
19
19
|
for="${this.forId}"
|
|
20
20
|
class="pkt-sr-only"
|
|
21
21
|
aria-describedby="${c}"
|
|
22
22
|
id="${this.forId}-label"
|
|
23
23
|
>
|
|
24
24
|
${this.label}
|
|
25
|
-
</label>`,d=()=>e.
|
|
25
|
+
</label>`,d=()=>e.p`
|
|
26
26
|
<pkt-helptext
|
|
27
27
|
class="${i.t(this.useWrapper?void 0:`pkt-hide`)}"
|
|
28
28
|
.forId=${this.forId}
|
|
@@ -32,10 +32,10 @@ const e=require(`./element-DjtxO-1r.cjs`),t=require(`./class-map-CJ-msbHs.cjs`),
|
|
|
32
32
|
@toggleHelpText=${e=>{this.toggleDropdown(e)}}
|
|
33
33
|
>${n.n(this,`helptext`)}</pkt-helptext
|
|
34
34
|
>
|
|
35
|
-
`,f=()=>this.counter?e.
|
|
36
|
-
${this.counterError?this.counterError:e.
|
|
37
|
-
${this.counterMaxLength?`/${this.counterMaxLength}`:e.
|
|
38
|
-
</div>`:e.
|
|
35
|
+
`,f=()=>this.counter?e.p`<div class="pkt-input__counter" aria-live="polite" aria-atomic="true">
|
|
36
|
+
${this.counterError?this.counterError:e.d} ${this.counterCurrent||0}
|
|
37
|
+
${this.counterMaxLength?`/${this.counterMaxLength}`:e.d}
|
|
38
|
+
</div>`:e.d,p=()=>this.hasError&&this.errorMessage?e.p`<pkt-alert
|
|
39
39
|
skin="error"
|
|
40
40
|
compact
|
|
41
41
|
id=${`${this.forId}-error`}
|
|
@@ -43,13 +43,13 @@ const e=require(`./element-DjtxO-1r.cjs`),t=require(`./class-map-CJ-msbHs.cjs`),
|
|
|
43
43
|
aria-atomic="true"
|
|
44
44
|
>
|
|
45
45
|
${r.r(this.errorMessage)}
|
|
46
|
-
</pkt-alert>`:e.
|
|
46
|
+
</pkt-alert>`:e.d,m=()=>e.p`
|
|
47
47
|
${u()}
|
|
48
48
|
${d()}
|
|
49
|
-
${this.counterPosition===`top`?f():e.
|
|
49
|
+
${this.counterPosition===`top`?f():e.d}
|
|
50
50
|
<div class="pkt-contents">${n.n(this)}</div>
|
|
51
|
-
${this.counterPosition===`bottom`?f():e.
|
|
51
|
+
${this.counterPosition===`bottom`?f():e.d}
|
|
52
52
|
${p()}
|
|
53
|
-
`;return e.
|
|
53
|
+
`;return e.p`<div class=${t.t(a)}>${this.hasFieldset?e.p`<fieldset class="pkt-inputwrapper__fieldset" aria-describedby="${c}">
|
|
54
54
|
${m()}
|
|
55
|
-
</fieldset>`:e.
|
|
55
|
+
</fieldset>`:e.p`<div class="pkt-inputwrapper__fieldset">${m()}</div>`}</div> `}toggleDropdown(e){this.dispatchEvent(new CustomEvent(`toggleHelpText`,{bubbles:!1,detail:{isOpen:e.detail.isOpen}}))}handleLabelClick(){this.dispatchEvent(new CustomEvent(`labelClick`,{bubbles:!0,composed:!0,detail:`label clicked`}))}};e.n([e.o({type:String})],l.prototype,`forId`,void 0),e.n([e.o({type:String})],l.prototype,`label`,void 0),e.n([e.o({type:String})],l.prototype,`helptext`,void 0),e.n([e.o({type:String})],l.prototype,`helptextDropdown`,void 0),e.n([e.o({type:String})],l.prototype,`helptextDropdownButton`,void 0),e.n([e.o({type:Boolean})],l.prototype,`counter`,void 0),e.n([e.o({type:Number})],l.prototype,`counterCurrent`,void 0),e.n([e.o({type:Number})],l.prototype,`counterMaxLength`,void 0),e.n([e.o({type:String})],l.prototype,`counterError`,void 0),e.n([e.o({type:String,reflect:!1})],l.prototype,`counterPosition`,void 0),e.n([e.o({type:Boolean})],l.prototype,`optionalTag`,void 0),e.n([e.o({type:String})],l.prototype,`optionalText`,void 0),e.n([e.o({type:Boolean})],l.prototype,`requiredTag`,void 0),e.n([e.o({type:String})],l.prototype,`requiredText`,void 0),e.n([e.o({type:String})],l.prototype,`tagText`,void 0),e.n([e.o({type:Boolean})],l.prototype,`hasError`,void 0),e.n([e.o({type:String})],l.prototype,`errorMessage`,void 0),e.n([e.o({type:Boolean})],l.prototype,`disabled`,void 0),e.n([e.o({type:Boolean})],l.prototype,`inline`,void 0),e.n([e.o({type:String})],l.prototype,`ariaDescribedby`,void 0),e.n([e.o({type:Boolean})],l.prototype,`hasFieldset`,void 0),e.n([e.o({type:String,reflect:!0})],l.prototype,`role`,void 0),e.n([e.o({type:Boolean,reflect:!0,converter:o.t})],l.prototype,`useWrapper`,void 0);try{e.s(`pkt-input-wrapper`)(l)}catch{console.warn(`Forsøker å definere <pkt-input-wrapper>, men den er allerede definert`)}var u=l;Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return u}});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const e=require(`./element-
|
|
1
|
+
const e=require(`./element-CXAtr6Gu.cjs`),t=require(`./class-map-B8Ja0q7n.cjs`),n=require(`./element-with-slot-Cmxb9h4H.cjs`);require(`./icon-Dw6I0HDV.cjs`);var r={name:`pkt-link`,react:`PktLink`,"css-class":`pkt-link`,"dark-mode":!0,isElement:!0,props:{href:{name:`URL`,description:`URL til lenken`,type:`string`,default:`#`,category:`contents`},target:{name:`Mål`,description:`Mål for lenken`,type:[`_blank`,`_self`,`_parent`,`_top`],default:`_self`,category:`tech`},iconName:{name:`Ikon`,description:`Ikon som skal vises ved siden av lenketeksten`,type:`icon`,category:`ui`},iconPosition:{name:`Ikonposisjon`,description:`Posisjonen til ikonet i forhold til lenketeksten`,type:[`left`,`right`],category:`ui`}},slots:{default:{description:`Innholdet i lenken`}}},i=class extends n.t{constructor(...e){super(...e),this.href=r.props.href.default,this.iconName=void 0,this.iconPosition=void 0,this.external=!1,this.target=r.props.target.default}render(){return e.p`<a
|
|
2
2
|
class=${t.t({"pkt-link":!0,"pkt-link--icon-left":!!this.iconName&&this.iconPosition===`left`||!!(this.iconName&&!this.iconPosition),"pkt-link--icon-right":!!this.iconName&&this.iconPosition===`right`,"pkt-link--external":this.external})}
|
|
3
3
|
href=${this.href}
|
|
4
4
|
.target=${this.target}
|
|
5
|
-
.rel=${this.external?`noopener noreferrer`:e.
|
|
6
|
-
>${this.iconName?e.
|
|
7
|
-
>`}};e.
|
|
5
|
+
.rel=${this.external?`noopener noreferrer`:e.d}
|
|
6
|
+
>${this.iconName?e.p`<pkt-icon name=${this.iconName} class="pkt-link__icon"></pkt-icon>`:``} <span>${n.n(this)}</span></a
|
|
7
|
+
>`}};e.n([e.o({type:String,reflect:!0})],i.prototype,`href`,void 0),e.n([e.o({type:String,reflect:!0})],i.prototype,`iconName`,void 0),e.n([e.o({type:String,reflect:!0})],i.prototype,`iconPosition`,void 0),e.n([e.o({type:Boolean,reflect:!0})],i.prototype,`external`,void 0),e.n([e.o({type:String,reflect:!0})],i.prototype,`target`,void 0);try{e.s(`pkt-link`)(i)}catch{console.warn(`Forsøker å definere <pkt-link>, men den er allerede definert`)}var a=i;Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as a } from "./class-map-
|
|
3
|
-
import { n as o, t as s } from "./element-with-slot-
|
|
4
|
-
import "./icon-
|
|
1
|
+
import { d as e, n as t, o as n, p as r, s as i } from "./element-CduG0XyF.js";
|
|
2
|
+
import { t as a } from "./class-map-DH9hlJny.js";
|
|
3
|
+
import { n as o, t as s } from "./element-with-slot-BVj9MXzi.js";
|
|
4
|
+
import "./icon-LaKyBKON.js";
|
|
5
5
|
var c = {
|
|
6
6
|
name: "pkt-link",
|
|
7
7
|
react: "PktLink",
|
|
@@ -47,7 +47,7 @@ var c = {
|
|
|
47
47
|
super(...e), this.href = c.props.href.default, this.iconName = void 0, this.iconPosition = void 0, this.external = !1, this.target = c.props.target.default;
|
|
48
48
|
}
|
|
49
49
|
render() {
|
|
50
|
-
return
|
|
50
|
+
return r`<a
|
|
51
51
|
class=${a({
|
|
52
52
|
"pkt-link": !0,
|
|
53
53
|
"pkt-link--icon-left": !!this.iconName && this.iconPosition === "left" || !!(this.iconName && !this.iconPosition),
|
|
@@ -56,29 +56,29 @@ var c = {
|
|
|
56
56
|
})}
|
|
57
57
|
href=${this.href}
|
|
58
58
|
.target=${this.target}
|
|
59
|
-
.rel=${this.external ? "noopener noreferrer" :
|
|
60
|
-
>${this.iconName ?
|
|
59
|
+
.rel=${this.external ? "noopener noreferrer" : e}
|
|
60
|
+
>${this.iconName ? r`<pkt-icon name=${this.iconName} class="pkt-link__icon"></pkt-icon>` : ""} <span>${o(this)}</span></a
|
|
61
61
|
>`;
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
|
-
|
|
64
|
+
t([n({
|
|
65
65
|
type: String,
|
|
66
66
|
reflect: !0
|
|
67
|
-
})], l.prototype, "href", void 0),
|
|
67
|
+
})], l.prototype, "href", void 0), t([n({
|
|
68
68
|
type: String,
|
|
69
69
|
reflect: !0
|
|
70
|
-
})], l.prototype, "iconName", void 0),
|
|
70
|
+
})], l.prototype, "iconName", void 0), t([n({
|
|
71
71
|
type: String,
|
|
72
72
|
reflect: !0
|
|
73
|
-
})], l.prototype, "iconPosition", void 0),
|
|
73
|
+
})], l.prototype, "iconPosition", void 0), t([n({
|
|
74
74
|
type: Boolean,
|
|
75
75
|
reflect: !0
|
|
76
|
-
})], l.prototype, "external", void 0),
|
|
76
|
+
})], l.prototype, "external", void 0), t([n({
|
|
77
77
|
type: String,
|
|
78
78
|
reflect: !0
|
|
79
79
|
})], l.prototype, "target", void 0);
|
|
80
80
|
try {
|
|
81
|
-
|
|
81
|
+
i("pkt-link")(l);
|
|
82
82
|
} catch {
|
|
83
83
|
console.warn("Forsøker å definere <pkt-link>, men den er allerede definert");
|
|
84
84
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const e=require(`./element-CXAtr6Gu.cjs`),t=require(`./element-with-slot-Cmxb9h4H.cjs`);require(`./icon-Dw6I0HDV.cjs`);const n=require(`./if-defined-LTjAScFG.cjs`);var r=class extends t.t{constructor(...e){super(...e),this.title=``,this.href=`#`,this.iconName=``,this.external=!1,this.openInNewTab=!1,this.skin=`normal`}render(){let r=[`pkt-linkcard`,this.skin&&`pkt-linkcard--${this.skin}`].filter(Boolean).join(` `),i=[`pkt-linkcard__title`,this.external&&`pkt-link pkt-link--external`].filter(Boolean).join(` `);return e.p`
|
|
2
|
+
<a
|
|
3
|
+
href=${this.href}
|
|
4
|
+
class=${r}
|
|
5
|
+
target=${this.openInNewTab?`_blank`:`_self`}
|
|
6
|
+
rel=${n.t(this.openInNewTab?`noopener noreferrer`:void 0)}
|
|
7
|
+
>
|
|
8
|
+
${this.iconName&&e.p`<pkt-icon class="pkt-link__icon" name="${this.iconName}" />`}
|
|
9
|
+
${this.title&&e.p`<div class=${i}>${this.title}</div>`}
|
|
10
|
+
|
|
11
|
+
<div class="pkt-linkcard__text">${t.n(this)}</div>
|
|
12
|
+
</a>
|
|
13
|
+
`}};e.n([e.o({type:String,reflect:!0})],r.prototype,`title`,void 0),e.n([e.o({type:String,reflect:!0})],r.prototype,`href`,void 0),e.n([e.o({type:String,reflect:!0})],r.prototype,`iconName`,void 0),e.n([e.o({type:Boolean,reflect:!0})],r.prototype,`external`,void 0),e.n([e.o({type:Boolean,reflect:!0})],r.prototype,`openInNewTab`,void 0),e.n([e.o({type:String,reflect:!0})],r.prototype,`skin`,void 0);try{e.s(`pkt-linkcard`)(r)}catch{console.warn(`Forsøker å definere <pkt-linkcard>, men den er allerede definert`)}var i=r;Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return i}});
|