@oslokommune/punkt-elements 20.0.3 → 20.1.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 +13 -0
- package/dist/{accordion-5N_ptxrN.cjs → accordion-CSSp30G1.cjs} +1 -1
- package/dist/{accordion-C5cu1xXT.js → accordion-DIjltHSH.js} +11 -14
- package/dist/{alert-DkyTTo7S.cjs → alert-0a5lX0pL.cjs} +12 -12
- package/dist/{alert-CA1fDbyc.js → alert-ZrB-P881.js} +36 -38
- package/dist/{async-directive-DCLIOGR8.cjs → async-directive-Bn7zgxUy.cjs} +1 -1
- package/dist/{async-directive-BcS8rfeC.js → async-directive-Ct3Mrb1M.js} +10 -11
- package/dist/{backlink-CXOxMeyt.cjs → backlink-BAvqdPlG.cjs} +1 -1
- package/dist/{backlink-CDBRcaAu.js → backlink-MBTAhQuD.js} +5 -7
- package/dist/{booleanish-OQJTYSrw.js → booleanish-CBa3Cr2h.js} +1 -2
- package/dist/{breadcrumbs-5oUaCef3.js → breadcrumbs-DtEt1-wn.js} +3 -4
- package/dist/{button-Bswo1C0M.js → button-CJzu0l5A.js} +45 -35
- package/dist/button-DHVRpzpS.cjs +32 -0
- package/dist/{calendar-BOd-9PDd.js → calendar-CkAAgviq.js} +66 -76
- package/dist/calendar-xYEsKilS.cjs +85 -0
- package/dist/{card-CKStAH0Q.js → card-CsEfBJcP.js} +10 -12
- package/dist/{card-BbV4OBqb.cjs → card-XznwedEG.cjs} +1 -1
- package/dist/{checkbox-iMOdzpJ_.cjs → checkbox-Cg7wnn8U.cjs} +1 -1
- package/dist/{checkbox-DIJbuqWm.js → checkbox-XvlUQmg5.js} +8 -10
- package/dist/{checkbox-group-Kua6HuRE.cjs → checkbox-group-BF29zyLd.cjs} +1 -1
- package/dist/{checkbox-group-DLLbWgQb.js → checkbox-group-CRIV5CX0.js} +8 -10
- package/dist/{class-map-BDwVSgLb.js → class-map-C9n5CNC8.js} +2 -3
- package/dist/{classutils-DcYnSgfc.js → classutils-C4jETHHk.js} +1 -2
- package/dist/{combobox-Pxa80TeZ.js → combobox-CDJcIkNJ.js} +63 -66
- package/dist/combobox-DuXavWEY.cjs +139 -0
- package/dist/{consent-UkinU27V.cjs → consent-BOSXNt4Y.cjs} +1 -1
- package/dist/{consent-p-0n2b9x.js → consent-DwppvYBR.js} +5 -7
- package/dist/{consume-Bp12si68.js → consume-C6aWEFx-.js} +4 -8
- package/dist/{converters-CW6SN0TT.cjs → converters-Dp64-kF1.cjs} +1 -1
- package/dist/{converters-CYgQrWVm.js → converters-v_GK06o3.js} +36 -72
- package/dist/{datepicker-Cpiu_Nrf.cjs → datepicker-Cnrbqm62.cjs} +53 -53
- package/dist/{datepicker-BpxUWiIC.js → datepicker-DHdFA8Dx.js} +82 -88
- package/dist/define-component-spec-wHP10r2x.js +5 -0
- package/dist/{dialog-polyfill.esm-D39dWbRt.js → dialog-polyfill.esm-BGBREnq_.js} +2 -3
- package/dist/dialog-polyfill.esm-BPk0-8XP.cjs +1 -0
- package/dist/{directive-helpers-BoDzpPID.js → directive-helpers-KMRvtO9j.js} +2 -3
- package/dist/{element-DLgZkx5L.js → element-Bwc-likm.js} +9 -18
- package/dist/{element-with-slot-mG-h7Sjw.js → element-with-slot-47quDZRt.js} +4 -6
- package/dist/{element-with-slot-CeKuRE3_.cjs → element-with-slot-D_8fAzCW.cjs} +1 -1
- package/dist/{fetch-header-footer-data-Pc32etrk.js → fetch-header-footer-data-CPVt_P8s.js} +3 -6
- package/dist/{fileupload-vPDmtXiM.js → fileupload-BQw5nlzQ.js} +25 -36
- package/dist/{fileupload-DXJtAagE.cjs → fileupload-Cjde62AR.cjs} +1 -1
- package/dist/{focus-modality-controller-Dc2S-KqR.js → focus-modality-controller-DVsT6GeR.js} +1 -2
- package/dist/focus-trap-C-PcFOw6.js +42 -0
- package/dist/focus-trap-C9tsr-xL.cjs +1 -0
- package/dist/{footer-CpE05IW2.cjs → footer-NQaQc2DH.cjs} +9 -9
- package/dist/{footer-D8t0PCPC.js → footer-SbOYv50e.js} +20 -24
- package/dist/{format-BTeSVkED.js → format-DwjTfa9h.js} +1 -2
- package/dist/{header-ChT1hHNA.js → header-CZnKVVt4.js} +22 -26
- package/dist/{header-CiwHNHKD.cjs → header-YbbGgmsD.cjs} +2 -2
- package/dist/{header-menu-Dq9lwNr1.cjs → header-menu-BJMMwrCR.cjs} +1 -1
- package/dist/{header-menu-BrjsNjBH.js → header-menu-k2ACrfOv.js} +9 -11
- package/dist/{heading-DAkjw2Am.cjs → heading-BNlor2MU.cjs} +1 -1
- package/dist/{heading-CMZmPEL9.js → heading-SYKHysr8.js} +19 -21
- package/dist/{helptext-Bse1LpRd.cjs → helptext-CQaNvbiv.cjs} +9 -9
- package/dist/{helptext-BFQzrOw4.js → helptext-kKmVQkwo.js} +20 -22
- package/dist/{icon-C1oCGwEe.js → icon-CZDw42U7.js} +5 -8
- package/dist/if-defined-B3pYog2C.js +4 -0
- package/dist/{input-element-2LHxo0em.cjs → input-element-CfZIyfon.cjs} +1 -1
- package/dist/{input-element-De40zUox.js → input-element-DE0FzjgP.js} +19 -25
- package/dist/{input-wrapper-C_Rzwxx7.cjs → input-wrapper-CbYMk21W.cjs} +1 -1
- package/dist/{input-wrapper-DkpJS1hR.js → input-wrapper-DYg1VHPv.js} +13 -15
- package/dist/{link-DLPpwjq4.js → link-Bc4zf-Dj.js} +19 -22
- package/dist/link-lPrxhYq0.cjs +7 -0
- package/dist/{linkcard-DIG6VYpl.cjs → linkcard-Bih7HS2t.cjs} +1 -1
- package/dist/{linkcard-Dr-r8jBO.js → linkcard-LCFAdVsG.js} +7 -9
- package/dist/{listbox-HrH4JonS.cjs → listbox-Du8llYth.cjs} +10 -10
- package/dist/{listbox-DAvIBH4P.js → listbox-df8gHweY.js} +17 -19
- package/dist/{loader-CFidlqSG.js → loader-C-2b3bGK.js} +9 -12
- package/dist/{loader-DTIrOtTo.cjs → loader-DiQSwWpb.cjs} +1 -1
- package/dist/{messagebox-BLYx3AL7.cjs → messagebox-BiG-fJX9.cjs} +1 -1
- package/dist/{messagebox-B_07P0QA.js → messagebox-CH3bKoJO.js} +9 -11
- package/dist/modal-B3rnE83a.cjs +37 -0
- package/dist/{modal-CA_M2Ix6.js → modal-SBJ8aGvM.js} +33 -35
- package/dist/{option-group-element-DzM8YznZ.js → option-group-element-DtSw52Dr.js} +7 -8
- package/dist/{option-group-element-CVNaBIlP.cjs → option-group-element-dN0ntPZk.cjs} +1 -1
- 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.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-group.cjs +1 -1
- package/dist/pkt-checkbox-group.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 +2 -3
- package/dist/pkt-fileupload.cjs +1 -1
- package/dist/pkt-fileupload.js +1 -1
- package/dist/pkt-footer.cjs +1 -1
- package/dist/pkt-footer.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.js +1 -1
- package/dist/pkt-index.cjs +1 -1
- package/dist/pkt-index.js +37 -37
- 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-CzvBlEPD.js → pkt-options-controller-Dz7DP0wC.js} +2 -3
- package/dist/{pkt-options-controller-9zoH1OBW.cjs → pkt-options-controller-WsHVdPJA.cjs} +1 -1
- package/dist/pkt-progressbar.cjs +1 -1
- package/dist/pkt-progressbar.js +1 -1
- package/dist/pkt-radio-group.cjs +1 -1
- package/dist/pkt-radio-group.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-CfCc2zhp.js → progressbar-DlbkKRgP.js} +9 -11
- package/dist/{progressbar-BdqIhC1Z.cjs → progressbar-Wyq_Q1Ur.cjs} +1 -1
- package/dist/{provide-_MnlMGnw.js → provide-DFu2tSv_.js} +3 -5
- package/dist/{radio-group-BRY_74od.js → radio-group-bRF8fnPW.js} +8 -10
- package/dist/{radio-group-CsUgnEv0.cjs → radio-group-u1IH7g-4.cjs} +1 -1
- package/dist/{radiobutton-CQhuG2lj.cjs → radiobutton-86ZvvDmJ.cjs} +1 -1
- package/dist/{radiobutton-lHnq8wX_.js → radiobutton-Bf6aFfYt.js} +8 -10
- package/dist/{ref-B6p6mQkO.cjs → ref-C6VUWwmF.cjs} +1 -1
- package/dist/{ref-BAegS9BR.js → ref-qE1RBrI7.js} +3 -4
- package/dist/{repeat-Cy1M16Di.js → repeat-c2P6osbb.js} +3 -4
- package/dist/{scroll-lock-CR-g54ai.js → scroll-lock-C9jzbJ4E.js} +1 -2
- package/dist/{searchinput-TAqMUJ0B.cjs → searchinput-D5l64Mkb.cjs} +7 -7
- package/dist/{searchinput-BLGaXkP6.js → searchinput-DN8kDZQ1.js} +18 -20
- package/dist/{select-Dle67Uwv.cjs → select-C7kAlSxs.cjs} +15 -15
- package/dist/{select-BvtUxW0Q.js → select-CXIEM2qY.js} +15 -18
- package/dist/shared-types/button.d.ts +13 -0
- package/dist/shared-types/index.d.ts +1 -1
- package/dist/shared-types-BvRk9kiK.js +0 -0
- package/dist/{tabs-BmmTUKuC.js → tabs-Cg16Sl3u.js} +57 -60
- package/dist/tabs-n7hQWwyI.cjs +40 -0
- package/dist/{tag-BZdC0voc.cjs → tag-BAikRN2Y.cjs} +1 -1
- package/dist/{tag-Cam7ISOF.js → tag-HXcXopyA.js} +9 -11
- package/dist/{textarea-Djp5L2Zd.js → textarea-12le8b4I.js} +12 -14
- package/dist/{textarea-DSX3jMlI.cjs → textarea-CRcSfWgX.cjs} +1 -1
- package/dist/{textinput-CBrOZcvL.js → textinput-CC0zxUBT.js} +11 -13
- package/dist/{textinput-CN2F3Q3H.cjs → textinput-Dooq2n8W.cjs} +1 -1
- package/dist/{timepicker-CkaJkIGn.cjs → timepicker-BM4I5w-i.cjs} +20 -20
- package/dist/{timepicker-CT4wfrgQ.js → timepicker-Cz81VQu3.js} +27 -28
- package/dist/{utils-BwF4QSrq.js → utils-Dn5ykFtS.js} +1 -2
- package/package.json +10 -10
- package/src/components/button/button.ts +14 -14
- package/dist/button-bVWAX98x.cjs +0 -32
- package/dist/calendar-CDTCgTJn.cjs +0 -85
- package/dist/combobox-CWL8T3UK.cjs +0 -139
- package/dist/define-component-spec-BYOSeplU.js +0 -6
- package/dist/dialog-polyfill.esm-CW51hN2p.cjs +0 -1
- package/dist/focus-trap-DG3pEuyJ.js +0 -60
- package/dist/focus-trap-DSv4Ifqm.cjs +0 -1
- package/dist/if-defined-DiYi2v_Q.js +0 -5
- package/dist/link-pkFJ11Zd.cjs +0 -7
- package/dist/modal-BvTfLfFq.cjs +0 -37
- package/dist/shared-types-A6iGIX-f.js +0 -1
- package/dist/tabs-B96Orh6O.cjs +0 -40
package/dist/pkt-radio-group.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as PktRadioGroup, t as default } from "./radio-group-
|
|
1
|
+
export { n as PktRadioGroup, t as default } from "./radio-group-bRF8fnPW.js";
|
package/dist/pkt-radiobutton.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./radiobutton-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./radiobutton-86ZvvDmJ.cjs");exports.PktRadioButton=e.n,exports.default=e.t;
|
package/dist/pkt-radiobutton.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as PktRadioButton, t as default } from "./radiobutton-
|
|
1
|
+
export { n as PktRadioButton, t as default } from "./radiobutton-Bf6aFfYt.js";
|
package/dist/pkt-searchinput.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./searchinput-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./searchinput-D5l64Mkb.cjs");exports.PktSearchInput=e.n,exports.default=e.t;
|
package/dist/pkt-searchinput.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as PktSearchInput, t as default } from "./searchinput-
|
|
1
|
+
export { n as PktSearchInput, t as default } from "./searchinput-DN8kDZQ1.js";
|
package/dist/pkt-select.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./select-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./select-C7kAlSxs.cjs");exports.PktSelect=e.n,exports.default=e.t;
|
package/dist/pkt-select.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as PktSelect, t as default } from "./select-
|
|
1
|
+
export { n as PktSelect, t as default } from "./select-CXIEM2qY.js";
|
package/dist/pkt-tabs.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./tabs-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./tabs-n7hQWwyI.cjs");exports.PktTabItem=e.n,exports.PktTabs=e.r,exports.default=e.t;
|
package/dist/pkt-tabs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as PktTabItem, r as PktTabs, t as default } from "./tabs-
|
|
1
|
+
export { n as PktTabItem, r as PktTabs, t as default } from "./tabs-Cg16Sl3u.js";
|
package/dist/pkt-tag.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./tag-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./tag-BAikRN2Y.cjs");exports.PktTag=e.n,exports.default=e.t;
|
package/dist/pkt-tag.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as PktTag, t as default } from "./tag-
|
|
1
|
+
export { n as PktTag, t as default } from "./tag-HXcXopyA.js";
|
package/dist/pkt-textarea.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./textarea-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./textarea-CRcSfWgX.cjs");exports.PktTextarea=e.n,exports.default=e.t;
|
package/dist/pkt-textarea.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as PktTextarea, t as default } from "./textarea-
|
|
1
|
+
export { n as PktTextarea, t as default } from "./textarea-12le8b4I.js";
|
package/dist/pkt-textinput.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./textinput-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./textinput-Dooq2n8W.cjs");exports.PktTextinput=e.n,exports.default=e.t;
|
package/dist/pkt-textinput.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as PktTextinput, t as default } from "./textinput-
|
|
1
|
+
export { n as PktTextinput, t as default } from "./textinput-CC0zxUBT.js";
|
package/dist/pkt-timepicker.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./timepicker-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./timepicker-BM4I5w-i.cjs");exports.PktTimepicker=e.t;
|
package/dist/pkt-timepicker.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as PktTimepicker } from "./timepicker-
|
|
1
|
+
export { t as PktTimepicker } from "./timepicker-Cz81VQu3.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { _ as e, d as t, f as n, g as r, h as i, l as a, m as o, n as s, p as c, t as l, u } from "./element-
|
|
2
|
-
import { t as d } from "./class-map-
|
|
3
|
-
import { t as f } from "./format-
|
|
4
|
-
import "./shared-types-
|
|
5
|
-
import { t as p } from "./if-defined-
|
|
6
|
-
import { n as m, t as h } from "./ref-
|
|
7
|
-
import { n as g } from "./utils-
|
|
8
|
-
|
|
1
|
+
import { _ as e, d as t, f as n, g as r, h as i, l as a, m as o, n as s, p as c, t as l, u } from "./element-Bwc-likm.js";
|
|
2
|
+
import { t as d } from "./class-map-C9n5CNC8.js";
|
|
3
|
+
import { t as f } from "./format-DwjTfa9h.js";
|
|
4
|
+
import "./shared-types-BvRk9kiK.js";
|
|
5
|
+
import { t as p } from "./if-defined-B3pYog2C.js";
|
|
6
|
+
import { n as m, t as h } from "./ref-qE1RBrI7.js";
|
|
7
|
+
import { n as g } from "./utils-Dn5ykFtS.js";
|
|
8
|
+
// ../../shared-types/progressbar.ts
|
|
9
9
|
var _ = {
|
|
10
10
|
ariaLive: "polite",
|
|
11
11
|
role: "progressbar",
|
|
@@ -129,8 +129,6 @@ try {
|
|
|
129
129
|
} catch {
|
|
130
130
|
console.warn("Forsøker å definere <pkt-progressbar>, men den er allerede definert");
|
|
131
131
|
}
|
|
132
|
-
|
|
133
|
-
//#region src/components/progressbar/index.ts
|
|
132
|
+
// src/components/progressbar/index.ts
|
|
134
133
|
var S = x;
|
|
135
|
-
//#endregion
|
|
136
134
|
export { x as n, S as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require("./element-CEarCnHH.cjs"),t=require("./class-map-C82GtM1w.cjs"),n=require("./format-B8meU8Tm.cjs");require("./shared-types-BvRk9kiK.cjs");const r=require("./if-defined-Ci4ZQsgL.cjs"),i=require("./ref-
|
|
1
|
+
const e=require("./element-CEarCnHH.cjs"),t=require("./class-map-C82GtM1w.cjs"),n=require("./format-B8meU8Tm.cjs");require("./shared-types-BvRk9kiK.cjs");const r=require("./if-defined-Ci4ZQsgL.cjs"),i=require("./ref-C6VUWwmF.cjs"),a=require("./utils-63cRpWut.cjs");var o={ariaLive:`polite`,role:`progressbar`,skin:`dark-blue`,statusPlacement:`following`,statusType:`none`,titlePosition:`left`,valueCurrent:0,valueMax:100,valueMin:0},s=`important`,c=` !`+s,l=e.f(class extends e.p{constructor(t){if(super(t),t.type!==e.m.ATTRIBUTE||t.name!==`style`||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce((t,n)=>{let r=e[n];return r==null?t:t+`${n=n.includes(`-`)?n:n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,`-$&`).toLowerCase()}:${r};`},``)}update(t,[n]){let{style:r}=t.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(n)),this.render(n);for(let e of this.ft)n[e]??(this.ft.delete(e),e.includes(`-`)?r.removeProperty(e):r[e]=null);for(let e in n){let t=n[e];if(t!=null){this.ft.add(e);let n=typeof t==`string`&&t.endsWith(c);e.includes(`-`)||n?r.setProperty(e,n?t.slice(0,-11):t,n?s:``):r[e]=t}}return e.g}}),u=class extends e.t{constructor(...e){super(...e),this.ariaLabel=null,this.ariaLabelledby=null,this.ariaValueText=null,this.ariaLive=o.ariaLive,this.id=a.n(),this.role=o.role,this.skin=o.skin,this.statusPlacement=o.statusPlacement,this.statusType=o.statusType,this.title=``,this.titlePosition=o.titlePosition,this.valueCurrent=o.valueCurrent,this.valueMax=o.valueMax,this.valueMin=o.valueMin,this.labelWidth=0,this.progressbarId=this.id,this.resolvedRole=o.role,this.labelRef=i.t(),this.containerRef=i.t()}willUpdate(e){super.willUpdate(e),this.id&&(this.progressbarId=this.id);let t=this.getAttribute(`role`);t?(this.resolvedRole=t,this.removeAttribute(`role`)):this.role&&(this.resolvedRole=this.role)}updated(e){if(super.updated(e),e.has(`valueCurrent`)&&this.labelRef.value){let e=this.labelRef.value.getBoundingClientRect().width||0;e!==this.labelWidth&&(this.labelWidth=e,this.containerRef.value?.style.setProperty(`--pkt-progress-label-width`,`${e}px`))}}render(){let a=this.statusType!==`none`,o=this.valueMax-this.valueMin,s=this.valueCurrent-this.valueMin,c=Math.round(s/o*100),u=n.t(this.pktStrings.get(`progressbar`).fraction,{current:s,total:o}),d=this.statusType===`fraction`&&!this.ariaValueText?u:this.ariaValueText||``,f=this.ariaLabel?void 0:this.ariaLabelledby||`${this.progressbarId}-title`,p=t.t({"pkt-progressbar__bar":!0,[`pkt-progressbar__bar--${this.skin}`]:!!this.skin}),m=t.t({"pkt-progressbar__title":!0,"pkt-progressbar__title-center":this.titlePosition===`center`}),h=t.t({"pkt-progressbar__status":!0,"pkt-progressbar__status--center":this.statusPlacement===`center`}),g=t.t({"pkt-progressbar__status-placement--following":this.statusPlacement===`following`,"pkt-progressbar__status-placement--center":this.statusPlacement===`center`,"pkt-progressbar__status-placement--left":this.statusPlacement===`left`});return e._`<div
|
|
2
2
|
role=${this.resolvedRole}
|
|
3
3
|
aria-live=${r.t(this.ariaLive||void 0)}
|
|
4
4
|
aria-atomic="true"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as e } from "./consume-
|
|
2
|
-
|
|
1
|
+
import { r as e } from "./consume-C6aWEFx-.js";
|
|
2
|
+
// ../../node_modules/@lit/context/lib/value-notifier.js
|
|
3
3
|
var t = class {
|
|
4
4
|
get value() {
|
|
5
5
|
return this.o;
|
|
@@ -57,8 +57,7 @@ var t = class {
|
|
|
57
57
|
this.host.dispatchEvent(new n(this.context, this.host));
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
|
-
|
|
61
|
-
//#region ../../node_modules/@lit/context/lib/decorators/provide.js
|
|
60
|
+
// ../../node_modules/@lit/context/lib/decorators/provide.js
|
|
62
61
|
function i({ context: e }) {
|
|
63
62
|
return (t, n) => {
|
|
64
63
|
let i = /* @__PURE__ */ new WeakMap();
|
|
@@ -107,5 +106,4 @@ function i({ context: e }) {
|
|
|
107
106
|
}
|
|
108
107
|
};
|
|
109
108
|
}
|
|
110
|
-
//#endregion
|
|
111
109
|
export { i as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as i } from "./
|
|
3
|
-
import { i as a, n as o, t as s } from "./option-group-element-
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { t as e } from "./provide-DFu2tSv_.js";
|
|
2
|
+
import { d as t, l as n, n as r, u as i } from "./element-Bwc-likm.js";
|
|
3
|
+
import { i as a, n as o, t as s } from "./option-group-element-DtSw52Dr.js";
|
|
4
|
+
import { r as c } from "./radiobutton-Bf6aFfYt.js";
|
|
5
|
+
// src/components/radio-group/radio-group.ts
|
|
6
6
|
var l = class extends s {
|
|
7
7
|
constructor(...e) {
|
|
8
8
|
super(...e), this.optionSelector = "pkt-radiobutton", this.groupContext = {
|
|
@@ -39,14 +39,12 @@ var l = class extends s {
|
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
-
|
|
42
|
+
r([e({ context: c }), n()], l.prototype, "groupContext", void 0), r([i({ type: String })], l.prototype, "value", null);
|
|
43
43
|
try {
|
|
44
|
-
|
|
44
|
+
t("pkt-radio-group")(l);
|
|
45
45
|
} catch {
|
|
46
46
|
console.warn("Forsøker å definere <pkt-radio-group>, men den er allerede definert");
|
|
47
47
|
}
|
|
48
|
-
|
|
49
|
-
//#region src/components/radio-group/index.ts
|
|
48
|
+
// src/components/radio-group/index.ts
|
|
50
49
|
var u = l;
|
|
51
|
-
//#endregion
|
|
52
50
|
export { l as n, u as t };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./
|
|
1
|
+
const e=require("./provide-Cz18sYug.cjs"),t=require("./element-CEarCnHH.cjs"),n=require("./option-group-element-dN0ntPZk.cjs"),r=require("./radiobutton-86ZvvDmJ.cjs");var i=class extends n.t{constructor(...e){super(...e),this.optionSelector=`pkt-radiobutton`,this.groupContext={name:``,hasTile:!1,hasError:!1,required:!1},this.storedValue=null}get value(){let e=this.options().find(n.n);return e?n.i(e):``}set value(e){let t=this.value;this.storedValue=e??``,this.applyStoredValue(this.options()),this.requestUpdate(`value`,t)}get hasStoredValue(){return this.storedValue!==null}storeCurrentValue(){this.storedValue=this.value}applyStoredValue(e){e.forEach(e=>{let t=this.storedValue!==``&&n.i(e)===this.storedValue;n.n(e)!==t&&(e.checked=t)})}createGroupContext(){return{...super.createGroupContext(),required:this.required}}};t.n([e.t({context:r.r}),t.l()],i.prototype,`groupContext`,void 0),t.n([t.u({type:String})],i.prototype,`value`,null);try{t.d(`pkt-radio-group`)(i)}catch{console.warn(`Forsøker å definere <pkt-radio-group>, 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,4 +1,4 @@
|
|
|
1
|
-
const e=require("./element-CEarCnHH.cjs"),t=require("./class-map-C82GtM1w.cjs");require("./shared-types-BvRk9kiK.cjs");const n=require("./consume-kEjgTrAp.cjs"),r=require("./ref-
|
|
1
|
+
const e=require("./element-CEarCnHH.cjs"),t=require("./class-map-C82GtM1w.cjs");require("./shared-types-BvRk9kiK.cjs");const n=require("./consume-kEjgTrAp.cjs"),r=require("./ref-C6VUWwmF.cjs"),i=require("./input-element-CfZIyfon.cjs");var a={defaultChecked:!1,hasTile:!1,disabled:!1,hasError:!1,requiredTag:!1,optionalTag:!1},o=n.n(Symbol(`pkt-radio-group-context`)),s=class extends i.t{constructor(...e){super(...e),this.inputRef=r.t(),this.value=``,this.checkHelptext=null,this.defaultChecked=a.defaultChecked,this.hasTile=a.hasTile,this.checked=null,this.type=`radio`,this.inputSize=void 0,this.tagText=null,this.optionalTag=a.optionalTag,this.requiredTag=a.requiredTag,this._checked=!1}connectedCallback(){super.connectedCallback()}attributeChangedCallback(e,t,n){e===`checked`&&(this._checked=this.checked===``||this.checked===`true`||this.checked===!0),super.attributeChangedCallback(e,t,n)}render(){let n=this.hasTile||!!this.groupContext?.hasTile,i=t.t({"pkt-input-check__input":!0,"pkt-input-check__input--tile":n,"pkt-input-check__input--tile-disabled":this.isDisabled&&n}),a=t.t({"pkt-input-check__input-checkbox":!0,"pkt-input-check__input-checkbox--error":this.hasError||!!this.groupContext?.hasError}),o=t.t({"pkt-input-check__input-label":!0,"pkt-input-check__input-label--disabled":this.isDisabled,"pkt-sr-only":this.hideLabel}),s=`pkt-tag pkt-tag--small pkt-tag--thin-text`,c=this.pktStrings.get(`forms`),l=()=>e._`
|
|
2
2
|
${this.tagText?e._`<span class=${s+` pkt-tag--gray`}>${this.tagText}</span>`:e.h}
|
|
3
3
|
${this.optionalTag?e._`<span class=${s+` pkt-tag--blue-pale`}
|
|
4
4
|
>${this.optionalText??c.optional}</span
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { _ as e, d as t, h as n, l as r, n as i, u as a } from "./element-
|
|
2
|
-
import { t as o } from "./class-map-
|
|
3
|
-
import "./shared-types-
|
|
4
|
-
import { n as s, t as c } from "./consume-
|
|
5
|
-
import { n as l, t as u } from "./ref-
|
|
6
|
-
import { t as d } from "./input-element-
|
|
7
|
-
|
|
1
|
+
import { _ as e, d as t, h as n, l as r, n as i, u as a } from "./element-Bwc-likm.js";
|
|
2
|
+
import { t as o } from "./class-map-C9n5CNC8.js";
|
|
3
|
+
import "./shared-types-BvRk9kiK.js";
|
|
4
|
+
import { n as s, t as c } from "./consume-C6aWEFx-.js";
|
|
5
|
+
import { n as l, t as u } from "./ref-qE1RBrI7.js";
|
|
6
|
+
import { t as d } from "./input-element-DE0FzjgP.js";
|
|
7
|
+
// ../../shared-types/radiobutton.ts
|
|
8
8
|
var f = {
|
|
9
9
|
defaultChecked: !1,
|
|
10
10
|
hasTile: !1,
|
|
@@ -102,8 +102,6 @@ try {
|
|
|
102
102
|
} catch {
|
|
103
103
|
console.warn("Forsøker å definere <pkt-radiobutton>, men den er allerede definert");
|
|
104
104
|
}
|
|
105
|
-
|
|
106
|
-
//#region src/components/radiobutton/index.ts
|
|
105
|
+
// src/components/radiobutton/index.ts
|
|
107
106
|
var h = m;
|
|
108
|
-
//#endregion
|
|
109
107
|
export { m as n, p as r, h as t };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./element-CEarCnHH.cjs"),t=require("./async-directive-
|
|
1
|
+
const e=require("./element-CEarCnHH.cjs"),t=require("./async-directive-Bn7zgxUy.cjs");var n=()=>new r,r=class{},i=new WeakMap,a=e.f(class extends t.t{render(t){return e.h}update(t,[n]){let r=n!==this.G;return r&&this.rt(void 0),(r||this.lt!==this.ct)&&(this.G=n,this.ht=t.options?.host,this.rt(this.ct=t.element)),e.h}rt(e){if(this.G!==void 0){if(this.isConnected||(e=void 0),typeof this.G==`function`){let t=this.ht??globalThis,n=i.get(t);n===void 0&&(n=new WeakMap,i.set(t,n)),n.get(this.G)!==void 0&&this.G.call(this.ht,void 0),n.set(this.G,e),e!==void 0&&this.G.call(this.ht,e)}else this.G.value=e}}get lt(){return typeof this.G==`function`?i.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return n}});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { f as e, h as t } from "./element-
|
|
2
|
-
import { t as n } from "./async-directive-
|
|
3
|
-
|
|
1
|
+
import { f as e, h as t } from "./element-Bwc-likm.js";
|
|
2
|
+
import { t as n } from "./async-directive-Ct3Mrb1M.js";
|
|
3
|
+
// ../../node_modules/lit-html/directives/ref.js
|
|
4
4
|
var r = () => new i(), i = class {}, a = /* @__PURE__ */ new WeakMap(), o = e(class extends n {
|
|
5
5
|
render(e) {
|
|
6
6
|
return t;
|
|
@@ -27,5 +27,4 @@ var r = () => new i(), i = class {}, a = /* @__PURE__ */ new WeakMap(), o = e(cl
|
|
|
27
27
|
this.rt(this.ct);
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
-
//#endregion
|
|
31
30
|
export { o as n, r as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { f as e, g as t, m as n, p as r } from "./element-
|
|
2
|
-
import { a as i, n as a, o, r as s, t as c } from "./directive-helpers-
|
|
3
|
-
|
|
1
|
+
import { f as e, g as t, m as n, p as r } from "./element-Bwc-likm.js";
|
|
2
|
+
import { a as i, n as a, o, r as s, t as c } from "./directive-helpers-KMRvtO9j.js";
|
|
3
|
+
// ../../node_modules/lit-html/directives/repeat.js
|
|
4
4
|
var l = (e, t, n) => {
|
|
5
5
|
let r = /* @__PURE__ */ new Map();
|
|
6
6
|
for (let i = t; i <= n; i++) r.set(e[i], i);
|
|
@@ -53,5 +53,4 @@ var l = (e, t, n) => {
|
|
|
53
53
|
return this.ut = p, s(e, h), t;
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
|
-
//#endregion
|
|
57
56
|
export { u as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// ../../shared-utils/scroll-lock/index.ts
|
|
2
2
|
var e = "is-scroll-locked", t = 0, n = 0, r = () => typeof document < "u" && typeof window < "u", i = () => {
|
|
3
3
|
let t = document.body, r = document.documentElement;
|
|
4
4
|
n = window.scrollY || window.pageYOffset;
|
|
@@ -17,5 +17,4 @@ var e = "is-scroll-locked", t = 0, n = 0, r = () => typeof document < "u" && typ
|
|
|
17
17
|
}, c = () => ({ locked: !1 }), l = (e, t) => {
|
|
18
18
|
e.locked !== t && (e.locked = t, t ? o() : s());
|
|
19
19
|
};
|
|
20
|
-
//#endregion
|
|
21
20
|
export { l as n, c as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require("./element-CEarCnHH.cjs"),t=require("./
|
|
1
|
+
const e=require("./element-CEarCnHH.cjs"),t=require("./utils-63cRpWut.cjs"),n=require("./class-map-C82GtM1w.cjs"),r=require("./if-defined-Ci4ZQsgL.cjs"),i=require("./focus-modality-controller-C1ocyv2J.cjs");require("./icon-5A378_yh.cjs");var a=class extends e.t{constructor(...e){super(...e),this.appearance=`local`,this.inputSize=`medium`,this.disabled=!1,this.fullwidth=!1,this.id=t.n(),this.value=``,this.focusModality=new i.t(this,`.pkt-searchinput`)}willUpdate(e){super.willUpdate(e);let t=this.getAttribute(`aria-label`);t&&(this.inputAriaLabel=t,this.removeAttribute(`aria-label`))}get suggestionsId(){return`${this.id}-suggestions`}dispatchSearch(){this.dispatchEvent(new CustomEvent(`pkt-search`,{detail:{value:this.value},bubbles:!0,composed:!0}))}onInput(e){let t=e.target;this.value=t.value}onInputKeydown(e){e.key===`Enter`&&(this.action||e.preventDefault(),this.dispatchSearch())}onSearchClick(e){this.action||e.preventDefault(),this.dispatchSearch()}onSuggestionClick(e,t,n){let r=new CustomEvent(`pkt-suggestion-click`,{detail:{index:n,suggestion:t},bubbles:!0,composed:!0,cancelable:!0});this.dispatchEvent(r)||e.preventDefault()}renderSuggestion(t,n){let r=e._`
|
|
2
2
|
${t.title?e._`<h3 class="pkt-searchinput__suggestion-title">${t.title}</h3>`:e.h}
|
|
3
3
|
${t.text?e._`<p class="pkt-searchinput__suggestion-text">${t.text}</p>`:e.h}
|
|
4
4
|
`;return t.href?e._`<a
|
|
@@ -13,8 +13,8 @@ const e=require("./element-CEarCnHH.cjs"),t=require("./class-map-C82GtM1w.cjs");
|
|
|
13
13
|
@click=${e=>this.onSuggestionClick(e,t,n)}
|
|
14
14
|
>
|
|
15
15
|
${r}
|
|
16
|
-
</button>`}render(){let
|
|
17
|
-
${this.label?e._`<label for=${
|
|
16
|
+
</button>`}render(){let t=this.pktStrings.get(`searchinput`),i=n.t({"pkt-searchinput":!0,[`pkt-searchinput--${this.appearance}`]:!0,[`pkt-searchinput--${this.inputSize}`]:!0,"pkt-searchinput--fullwidth":this.fullwidth}),a=n.t({"pkt-searchinput__button":!0,"pkt-input-icon":this.appearance===`local`,"pkt-btn":!0,[`pkt-btn--${this.inputSize}`]:!0,"pkt-btn--icon-only":!0,"pkt-btn--tertiary":this.appearance===`local`,"pkt-btn--primary":this.appearance===`global`||this.appearance===`local-with-button`,"pkt-btn--yellow":this.appearance===`global`}),o=n.t({"pkt-input":!0,[`pkt-input--${this.inputSize}`]:!0,"pkt-input--fullwidth":this.fullwidth}),s=this.appearance===`local`?`pkt-input__container pkt-input__container--${this.inputSize}`:`pkt-searchinput__field`,c=e._`
|
|
17
|
+
${this.label?e._`<label for=${r.t(this.id||void 0)} class="pkt-inputwrapper__label"
|
|
18
18
|
>${this.label}</label
|
|
19
19
|
>`:e.h}
|
|
20
20
|
<div class=${s}>
|
|
@@ -23,12 +23,12 @@ const e=require("./element-CEarCnHH.cjs"),t=require("./class-map-C82GtM1w.cjs");
|
|
|
23
23
|
type="search"
|
|
24
24
|
name=${this.name||this.id}
|
|
25
25
|
id=${this.id}
|
|
26
|
-
placeholder=${this.placeholder||
|
|
26
|
+
placeholder=${this.placeholder||t.placeholder}
|
|
27
27
|
value=${this.value}
|
|
28
28
|
.value=${this.value}
|
|
29
29
|
?disabled=${this.disabled}
|
|
30
30
|
autocomplete="off"
|
|
31
|
-
aria-label=${
|
|
31
|
+
aria-label=${r.t(this.inputAriaLabel)}
|
|
32
32
|
aria-autocomplete=${this.suggestions?`list`:e.h}
|
|
33
33
|
aria-controls=${this.suggestions?this.suggestionsId:e.h}
|
|
34
34
|
@input=${this.onInput}
|
|
@@ -41,7 +41,7 @@ const e=require("./element-CEarCnHH.cjs"),t=require("./class-map-C82GtM1w.cjs");
|
|
|
41
41
|
@click=${this.onSearchClick}
|
|
42
42
|
>
|
|
43
43
|
<pkt-icon class="pkt-btn__icon" name="magnifying-glass-big"></pkt-icon>
|
|
44
|
-
<span class="pkt-btn__text">${this.label||this.placeholder||
|
|
44
|
+
<span class="pkt-btn__text">${this.label||this.placeholder||t.placeholder}</span>
|
|
45
45
|
</button>
|
|
46
46
|
</div>
|
|
47
47
|
${this.suggestions?e._`<ul
|
|
@@ -55,7 +55,7 @@ const e=require("./element-CEarCnHH.cjs"),t=require("./class-map-C82GtM1w.cjs");
|
|
|
55
55
|
role="search"
|
|
56
56
|
class=${i}
|
|
57
57
|
action=${this.action}
|
|
58
|
-
method=${
|
|
58
|
+
method=${r.t(this.method)}
|
|
59
59
|
>
|
|
60
60
|
${c}
|
|
61
61
|
</form>`:e._`<div role="search" class=${i}>${c}</div>`}};e.n([e.u({type:String})],a.prototype,`appearance`,void 0),e.n([e.u({type:String,attribute:`input-size`})],a.prototype,`inputSize`,void 0),e.n([e.u({type:Boolean,reflect:!0})],a.prototype,`disabled`,void 0),e.n([e.u({type:Boolean,reflect:!0})],a.prototype,`fullwidth`,void 0),e.n([e.u({type:String,reflect:!0})],a.prototype,`id`,void 0),e.n([e.u({type:String})],a.prototype,`label`,void 0),e.n([e.u({type:String})],a.prototype,`name`,void 0),e.n([e.u({type:String})],a.prototype,`placeholder`,void 0),e.n([e.u({type:String})],a.prototype,`value`,void 0),e.n([e.u({type:Array})],a.prototype,`suggestions`,void 0),e.n([e.u({type:String})],a.prototype,`action`,void 0),e.n([e.u({type:String})],a.prototype,`method`,void 0),e.n([e.l()],a.prototype,`inputAriaLabel`,void 0);try{e.d(`pkt-searchinput`)(a)}catch{console.warn(`Forsøker å definere <pkt-searchinput>, men den er allerede definert`)}var o=a;Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return o}});
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { _ as e, d as t, h as n, l as r, n as i, t as a, u as o } from "./element-
|
|
2
|
-
import {
|
|
3
|
-
import "./
|
|
4
|
-
import { t as
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
1
|
+
import { _ as e, d as t, h as n, l as r, n as i, t as a, u as o } from "./element-Bwc-likm.js";
|
|
2
|
+
import { n as s } from "./utils-Dn5ykFtS.js";
|
|
3
|
+
import { t as c } from "./class-map-C9n5CNC8.js";
|
|
4
|
+
import { t as l } from "./if-defined-B3pYog2C.js";
|
|
5
|
+
import { t as u } from "./focus-modality-controller-DVsT6GeR.js";
|
|
6
|
+
import "./icon-CZDw42U7.js";
|
|
7
|
+
// src/components/searchinput/searchinput.ts
|
|
8
8
|
var d = class extends a {
|
|
9
9
|
constructor(...e) {
|
|
10
|
-
super(...e), this.appearance = "local", this.inputSize = "medium", this.disabled = !1, this.fullwidth = !1, this.id =
|
|
10
|
+
super(...e), this.appearance = "local", this.inputSize = "medium", this.disabled = !1, this.fullwidth = !1, this.id = s(), this.value = "", this.focusModality = new u(this, ".pkt-searchinput");
|
|
11
11
|
}
|
|
12
12
|
willUpdate(e) {
|
|
13
13
|
super.willUpdate(e);
|
|
@@ -66,12 +66,12 @@ var d = class extends a {
|
|
|
66
66
|
</button>`;
|
|
67
67
|
}
|
|
68
68
|
render() {
|
|
69
|
-
let t = this.pktStrings.get("searchinput"), r =
|
|
69
|
+
let t = this.pktStrings.get("searchinput"), r = c({
|
|
70
70
|
"pkt-searchinput": !0,
|
|
71
71
|
[`pkt-searchinput--${this.appearance}`]: !0,
|
|
72
72
|
[`pkt-searchinput--${this.inputSize}`]: !0,
|
|
73
73
|
"pkt-searchinput--fullwidth": this.fullwidth
|
|
74
|
-
}), i =
|
|
74
|
+
}), i = c({
|
|
75
75
|
"pkt-searchinput__button": !0,
|
|
76
76
|
"pkt-input-icon": this.appearance === "local",
|
|
77
77
|
"pkt-btn": !0,
|
|
@@ -80,12 +80,12 @@ var d = class extends a {
|
|
|
80
80
|
"pkt-btn--tertiary": this.appearance === "local",
|
|
81
81
|
"pkt-btn--primary": this.appearance === "global" || this.appearance === "local-with-button",
|
|
82
82
|
"pkt-btn--yellow": this.appearance === "global"
|
|
83
|
-
}), a =
|
|
83
|
+
}), a = c({
|
|
84
84
|
"pkt-input": !0,
|
|
85
85
|
[`pkt-input--${this.inputSize}`]: !0,
|
|
86
86
|
"pkt-input--fullwidth": this.fullwidth
|
|
87
|
-
}), o = this.appearance === "local" ? `pkt-input__container pkt-input__container--${this.inputSize}` : "pkt-searchinput__field",
|
|
88
|
-
${this.label ? e`<label for=${
|
|
87
|
+
}), o = this.appearance === "local" ? `pkt-input__container pkt-input__container--${this.inputSize}` : "pkt-searchinput__field", s = e`
|
|
88
|
+
${this.label ? e`<label for=${l(this.id || void 0)} class="pkt-inputwrapper__label"
|
|
89
89
|
>${this.label}</label
|
|
90
90
|
>` : n}
|
|
91
91
|
<div class=${o}>
|
|
@@ -99,7 +99,7 @@ var d = class extends a {
|
|
|
99
99
|
.value=${this.value}
|
|
100
100
|
?disabled=${this.disabled}
|
|
101
101
|
autocomplete="off"
|
|
102
|
-
aria-label=${
|
|
102
|
+
aria-label=${l(this.inputAriaLabel)}
|
|
103
103
|
aria-autocomplete=${this.suggestions ? "list" : n}
|
|
104
104
|
aria-controls=${this.suggestions ? this.suggestionsId : n}
|
|
105
105
|
@input=${this.onInput}
|
|
@@ -127,10 +127,10 @@ var d = class extends a {
|
|
|
127
127
|
role="search"
|
|
128
128
|
class=${r}
|
|
129
129
|
action=${this.action}
|
|
130
|
-
method=${
|
|
130
|
+
method=${l(this.method)}
|
|
131
131
|
>
|
|
132
|
-
${
|
|
133
|
-
</form>` : e`<div role="search" class=${r}>${
|
|
132
|
+
${s}
|
|
133
|
+
</form>` : e`<div role="search" class=${r}>${s}</div>`;
|
|
134
134
|
}
|
|
135
135
|
};
|
|
136
136
|
i([o({ type: String })], d.prototype, "appearance", void 0), i([o({
|
|
@@ -151,8 +151,6 @@ try {
|
|
|
151
151
|
} catch {
|
|
152
152
|
console.warn("Forsøker å definere <pkt-searchinput>, men den er allerede definert");
|
|
153
153
|
}
|
|
154
|
-
|
|
155
|
-
//#region src/components/searchinput/index.ts
|
|
154
|
+
// src/components/searchinput/index.ts
|
|
156
155
|
var f = d;
|
|
157
|
-
//#endregion
|
|
158
156
|
export { d as n, f as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const e=require("./element-CEarCnHH.cjs"),t=require("./
|
|
1
|
+
const e=require("./element-CEarCnHH.cjs"),t=require("./ref-C6VUWwmF.cjs"),n=require("./if-defined-Ci4ZQsgL.cjs"),r=require("./input-element-CfZIyfon.cjs"),i=require("./pkt-options-controller-WsHVdPJA.cjs"),a=require("./element-with-slot-D_8fAzCW.cjs"),o=require("./input-wrapper-CbYMk21W.cjs");var s=class extends r.t{constructor(...e){super(...e),this._optionsProp=[],this._options=[]}get options(){return this._options.map(e=>({...e,selected:this.isOptionSelected(e)}))}set options(e){this._optionsProp=e,this.requestUpdate(`_optionsProp`,this._options)}isOptionSelected(e){return Array.isArray(this.value)?this.value.includes(e.value):e.value===this.value}findOptionByValue(e){return this._options.find(t=>t.value===e)}getSelectedOptions(){return this._options.filter(e=>this.isOptionSelected(e))}parseOptions(){let e=this._optionsProp.length>0,t=this.optionsController?.nodes?.length&&this.optionsController.nodes.length>0;e?this._options=this._optionsProp:t&&(this._options=this.optionsController.options)}willUpdate(e){super.willUpdate(e),this.parseOptions()}};e.n([e.u({type:Array,attribute:`options`})],s.prototype,`_optionsProp`,void 0),e.n([e.l()],s.prototype,`_options`,void 0);var c=class extends s{constructor(){super(),this.inputRef=t.t(),this.value=``,this.selectedIndex=-1,this.selectedOptions=void 0,this.defaultedToFirstOption=!1,this.optionsController=new i.t(this)}connectedCallback(){super.connectedCallback(),this.parseOptions(),this._options.forEach(e=>{e.selected&&!this.value&&(this.value=e.value)})}add(e,t){let n={value:e.value||e.text,label:e.text||e.value,selected:e.selected,disabled:e.disabled};if(t===void 0)this._options.push(n);else if(typeof t==`number`)this._options.splice(t,0,n);else{let e=t.value||t.text,r=this._options.findIndex(t=>t.value===e);r>=0?this._options.splice(r,0,n):this._options.push(n)}e.selected&&(this.value=e.value||e.text,this.selectedIndex=this._options.findIndex(e=>e.value===this.value)),this.requestUpdate()}remove(e){typeof e==`number`&&(this.selectedIndex===e&&(this.value=this._options[0]?.value||``),this._options.splice(e,1),this.requestUpdate())}item(e){return this.inputRef.value?.item(e)}namedItem(e){return this.inputRef.value?.namedItem(e)}showPicker(){this.inputRef.value&&`showPicker`in this.inputRef.value&&this.inputRef.value.showPicker()}attributeChangedCallback(e,t,n){e===`options`&&(this._options=n?JSON.parse(n):[]),e===`value`&&this.value!==t&&(this.selectedIndex=this.touched?this.returnNumberOrNull(this.inputRef.value?.selectedIndex):this._options.findIndex(e=>e.value===n),this.selectedOptions=this.inputRef.value?.selectedOptions,this.valueChanged(n,t)),super.attributeChangedCallback(e,t,n)}willUpdate(e){e.has(`_optionsProp`)&&this._optionsProp.length>0&&(this._options=this._optionsProp,!this.value&&this._options.length>0&&(this.value=this._options[0].value,this.selectedIndex=0)),super.willUpdate(e),this.hasUpdated||(!this.value&&this._options.length>0?(this.value=this._options[0].value,this.selectedIndex=0,this.defaultedToFirstOption=!0):this.selectedIndex=this._options.findIndex(e=>e.value===this.value)),e.has(`id`)&&!this.name&&this.id&&(this.name=this.id)}updated(e){super.updated(e),e.has(`value`)&&this.value!==e.get(`value`)&&(this.selectedIndex=this.touched?this.returnNumberOrNull(this.inputRef.value?.selectedIndex):this._options.findIndex(e=>e.value===this.value),this.selectedOptions=this.inputRef.value?.selectedOptions,this.valueChanged(this.value,e.get(`value`)))}firstUpdated(e){super.firstUpdated(e),this.classList.add(`pkt-select`),this.selectedOptions=this.inputRef.value?.selectedOptions,this.defaultedToFirstOption&&this.updateComplete.then(()=>this.dispatchChangeEvents(this.value))}render(){let r=`pkt-input pkt-input--${this.inputSize} ${this.fullwidth?`pkt-input--fullwidth`:``}`;return e._`
|
|
2
2
|
<pkt-input-wrapper
|
|
3
|
-
${
|
|
3
|
+
${a.n(this,[`helptext`])}
|
|
4
4
|
.strings=${this.strings}
|
|
5
5
|
.size=${this.inputSize}
|
|
6
6
|
?disabled=${this.isDisabled}
|
|
@@ -11,22 +11,22 @@ const e=require("./element-CEarCnHH.cjs"),t=require("./element-with-slot-CeKuRE3
|
|
|
11
11
|
?requiredTag=${this.requiredTag}
|
|
12
12
|
useWrapper=${this.useWrapper}
|
|
13
13
|
.ariaDescribedby=${this.ariaDescribedby}
|
|
14
|
-
errorMessage=${
|
|
14
|
+
errorMessage=${n.t(this.errorMessage)}
|
|
15
15
|
forId=${this.id+`-input`}
|
|
16
|
-
helptext=${
|
|
17
|
-
helptextDropdown=${
|
|
18
|
-
helptextDropdownButton=${
|
|
19
|
-
label=${
|
|
20
|
-
optionalText=${
|
|
21
|
-
requiredText=${
|
|
22
|
-
tagText=${
|
|
16
|
+
helptext=${n.t(this.helptext)}
|
|
17
|
+
helptextDropdown=${n.t(this.helptextDropdown)}
|
|
18
|
+
helptextDropdownButton=${n.t(this.helptextDropdownButton)}
|
|
19
|
+
label=${n.t(this.label)}
|
|
20
|
+
optionalText=${n.t(this.optionalText)}
|
|
21
|
+
requiredText=${n.t(this.requiredText)}
|
|
22
|
+
tagText=${n.t(this.tagText)}
|
|
23
23
|
>
|
|
24
24
|
<select
|
|
25
|
-
class=${
|
|
25
|
+
class=${r}
|
|
26
26
|
aria-invalid=${this.hasError}
|
|
27
|
-
aria-errormessage=${
|
|
28
|
-
aria-describedby=${
|
|
29
|
-
aria-labelledby=${
|
|
27
|
+
aria-errormessage=${n.t(this.hasError?`${this.id}-input-error`:void 0)}
|
|
28
|
+
aria-describedby=${n.t(o.r({id:this.id+`-input`,hasHelptext:!!this.helptext||this.hasSlotContent(`helptext`),hasCounter:!1,ariaDescribedby:this.ariaDescribedby}))}
|
|
29
|
+
aria-labelledby=${n.t(this.ariaLabelledby)}
|
|
30
30
|
?disabled=${this.isDisabled}
|
|
31
31
|
id=${this.id+`-input`}
|
|
32
32
|
name=${(this.name||this.id)+`-input`}
|
|
@@ -34,7 +34,7 @@ const e=require("./element-CEarCnHH.cjs"),t=require("./element-with-slot-CeKuRE3
|
|
|
34
34
|
@input=${e=>{this.onInput(),e.stopImmediatePropagation()}}
|
|
35
35
|
@focus=${e=>{this.onFocus(),e.stopImmediatePropagation()}}
|
|
36
36
|
@blur=${e=>{this.onBlur(),e.stopImmediatePropagation()}}
|
|
37
|
-
${
|
|
37
|
+
${t.n(this.inputRef)}
|
|
38
38
|
>
|
|
39
39
|
${this._options.length>0?this._options.map(t=>e._`<option
|
|
40
40
|
value=${t.value}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { _ as e, d as t, l as n, n as r, u as i } from "./element-
|
|
2
|
-
import { n as a } from "./
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
var f = class extends
|
|
1
|
+
import { _ as e, d as t, l as n, n as r, u as i } from "./element-Bwc-likm.js";
|
|
2
|
+
import { n as a, t as o } from "./ref-qE1RBrI7.js";
|
|
3
|
+
import { t as s } from "./if-defined-B3pYog2C.js";
|
|
4
|
+
import { t as c } from "./input-element-DE0FzjgP.js";
|
|
5
|
+
import { t as l } from "./pkt-options-controller-Dz7DP0wC.js";
|
|
6
|
+
import { n as u } from "./element-with-slot-47quDZRt.js";
|
|
7
|
+
import { r as d } from "./input-wrapper-DYg1VHPv.js";
|
|
8
|
+
// src/base-elements/options-input-element.ts
|
|
9
|
+
var f = class extends c {
|
|
10
10
|
constructor(...e) {
|
|
11
11
|
super(...e), this._optionsProp = [], this._options = [];
|
|
12
12
|
}
|
|
@@ -40,11 +40,10 @@ r([i({
|
|
|
40
40
|
type: Array,
|
|
41
41
|
attribute: "options"
|
|
42
42
|
})], f.prototype, "_optionsProp", void 0), r([n()], f.prototype, "_options", void 0);
|
|
43
|
-
|
|
44
|
-
//#region src/components/select/select.ts
|
|
43
|
+
// src/components/select/select.ts
|
|
45
44
|
var p = class extends f {
|
|
46
45
|
constructor() {
|
|
47
|
-
super(), this.inputRef =
|
|
46
|
+
super(), this.inputRef = o(), this.value = "", this.selectedIndex = -1, this.selectedOptions = void 0, this.defaultedToFirstOption = !1, this.optionsController = new l(this);
|
|
48
47
|
}
|
|
49
48
|
connectedCallback() {
|
|
50
49
|
super.connectedCallback(), this.parseOptions(), this._options.forEach((e) => {
|
|
@@ -94,7 +93,7 @@ var p = class extends f {
|
|
|
94
93
|
let t = `pkt-input pkt-input--${this.inputSize} ${this.fullwidth ? "pkt-input--fullwidth" : ""}`;
|
|
95
94
|
return e`
|
|
96
95
|
<pkt-input-wrapper
|
|
97
|
-
${
|
|
96
|
+
${u(this, ["helptext"])}
|
|
98
97
|
.strings=${this.strings}
|
|
99
98
|
.size=${this.inputSize}
|
|
100
99
|
?disabled=${this.isDisabled}
|
|
@@ -119,7 +118,7 @@ var p = class extends f {
|
|
|
119
118
|
class=${t}
|
|
120
119
|
aria-invalid=${this.hasError}
|
|
121
120
|
aria-errormessage=${s(this.hasError ? `${this.id}-input-error` : void 0)}
|
|
122
|
-
aria-describedby=${s(
|
|
121
|
+
aria-describedby=${s(d({
|
|
123
122
|
id: this.id + "-input",
|
|
124
123
|
hasHelptext: !!this.helptext || this.hasSlotContent("helptext"),
|
|
125
124
|
hasCounter: !1,
|
|
@@ -141,7 +140,7 @@ var p = class extends f {
|
|
|
141
140
|
@blur=${(e) => {
|
|
142
141
|
this.onBlur(), e.stopImmediatePropagation();
|
|
143
142
|
}}
|
|
144
|
-
${
|
|
143
|
+
${a(this.inputRef)}
|
|
145
144
|
>
|
|
146
145
|
${this._options.length > 0 ? this._options.map((t) => e`<option
|
|
147
146
|
value=${t.value}
|
|
@@ -165,8 +164,6 @@ try {
|
|
|
165
164
|
} catch {
|
|
166
165
|
console.warn("Forsøker å definere <pkt-select>, men den er allerede definert");
|
|
167
166
|
}
|
|
168
|
-
|
|
169
|
-
//#region src/components/select/index.ts
|
|
167
|
+
// src/components/select/index.ts
|
|
170
168
|
var m = p;
|
|
171
|
-
//#endregion
|
|
172
169
|
export { p as n, m as t };
|
|
@@ -43,3 +43,16 @@ export interface IPktButtonBase {
|
|
|
43
43
|
* Used for typed component specs in documentation.
|
|
44
44
|
*/
|
|
45
45
|
export type IButtonSpecProps = Pick<IPktButtonBase, 'size' | 'fullWidth' | 'fullWidthOnMobile' | 'skin' | 'type' | 'color' | 'state' | 'variant' | 'iconName' | 'secondIconName' | 'iconPath' | 'secondIconPath' | 'isLoading' | 'disabled'>;
|
|
46
|
+
/** Default values for pkt-button. Single source of truth for both frameworks */
|
|
47
|
+
export declare const BUTTON_DEFAULTS: {
|
|
48
|
+
readonly iconName: 'user';
|
|
49
|
+
readonly secondIconName: 'user';
|
|
50
|
+
readonly size: 'medium';
|
|
51
|
+
readonly fullWidth: false;
|
|
52
|
+
readonly fullWidthOnMobile: false;
|
|
53
|
+
readonly skin: 'primary';
|
|
54
|
+
readonly type: 'button';
|
|
55
|
+
readonly variant: 'label-only';
|
|
56
|
+
readonly isLoading: false;
|
|
57
|
+
readonly disabled: false;
|
|
58
|
+
};
|
|
@@ -30,7 +30,7 @@ export type { TLayout, TVerticalPosition, THorizontalPosition, TPosition, TPosit
|
|
|
30
30
|
export type { THTMLButtonType, TSelectionMode } from './form';
|
|
31
31
|
export { ACCORDION_LIGHT_ONLY_SKINS, ACCORDION_SKINS } from './accordion';
|
|
32
32
|
export type { TAccordionSkin, IPktAccordionBase, IPktAccordionItemBase, IAccordionSpecProps, IAccordionItemSpecProps, IAccordionVisualProps, } from './accordion';
|
|
33
|
-
export { BUTTON_SIZES, BUTTON_SKINS, BUTTON_COLORS, BUTTON_VARIANTS, BUTTON_STATES } from './button';
|
|
33
|
+
export { BUTTON_SIZES, BUTTON_SKINS, BUTTON_COLORS, BUTTON_VARIANTS, BUTTON_STATES, BUTTON_DEFAULTS, } from './button';
|
|
34
34
|
export type { TPktButtonSize, TPktButtonSkin, TPktButtonColor, TPktButtonVariant, TPktButtonState, IPktButtonBase, IButtonSpecProps, } from './button';
|
|
35
35
|
export type { IPktBackLinkBase, IBacklinkSpecProps } from './backlink';
|
|
36
36
|
export { LINKCARD_SKINS, LINKCARD_LIGHT_ONLY_SKINS } from './linkcard';
|
|
File without changes
|