@oslokommune/punkt-elements 13.6.15 → 13.8.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 +40 -0
- package/dist/{accordionitem-B_h5XGCo.js → accordionitem-C_URrDjP.js} +4 -4
- package/dist/{accordionitem-BOmnm80g.cjs → accordionitem-DCZrHVNR.cjs} +1 -1
- package/dist/{alert-ZP5-fqlt.cjs → alert-Ci7WvRXi.cjs} +1 -1
- package/dist/{alert-CTTm6ugp.js → alert-Dh1YhaBq.js} +13 -26
- package/dist/{backlink-BT7DO6rV.cjs → backlink-BzEvli8m.cjs} +1 -1
- package/dist/{backlink-Bq8O2bt8.js → backlink-CI_jMGzZ.js} +3 -3
- package/dist/{button-x6Xw-5w0.js → button-CCFAUJa0.js} +5 -5
- package/dist/{button-BfqxLnMT.cjs → button-CXJQ_Wgl.cjs} +1 -1
- package/dist/calendar-BaMrdMDZ.cjs +115 -0
- package/dist/{calendar-CodWwTHM.js → calendar-DtJh7UYD.js} +532 -480
- package/dist/{card-B9RPShvV.cjs → card-Cf-UcGAP.cjs} +1 -1
- package/dist/{card-en2KhOPO.js → card-M1X36b6i.js} +8 -26
- package/dist/{checkbox-CH8xeK-0.cjs → checkbox-CTxc8wQe.cjs} +1 -1
- package/dist/{checkbox-DSAcMC-D.js → checkbox-_5LbXU7N.js} +4 -4
- package/dist/class-map-C_erArZz.cjs +5 -0
- package/dist/{class-map-Dw6Wrxwi.js → class-map-wy7PUk0P.js} +3 -3
- package/dist/{combobox-BFOjlFIj.cjs → combobox-BJ1gA0f0.cjs} +1 -1
- package/dist/{combobox-DaiEdUKx.js → combobox-Ct0NNY1p.js} +12 -16
- package/dist/{consent-CXp0bLvg.js → consent-B2hIQh4b.js} +3 -3
- package/dist/{consent-DFrsiYGQ.cjs → consent-BeOjxQdR.cjs} +1 -1
- package/dist/{datepicker-CbVSKaOY.js → datepicker-B8mifBAm.js} +12 -28
- package/dist/{datepicker-BR1imflE.cjs → datepicker-DVqmQAOe.cjs} +1 -1
- package/dist/directive-helpers-4oOjKnGY.cjs +5 -0
- package/dist/directive-helpers-BzAtj9by.js +38 -0
- package/dist/{element-D62wHiNU.cjs → element-CJ_QKaki.cjs} +6 -6
- package/dist/{element-DJZPsA_J.js → element-CRDRygXu.js} +47 -132
- package/dist/{heading-H_FWjo2k.cjs → heading--JKFppLS.cjs} +1 -1
- package/dist/{heading-DQ0R34j4.js → heading-Cs5yGnJg.js} +1 -1
- package/dist/{helptext-D1fkGmfT.cjs → helptext-CVQP3pis.cjs} +1 -1
- package/dist/{helptext-8ykxyegi.js → helptext-DuvVSH7d.js} +6 -6
- package/dist/icon-1dy7UZcu.js +89 -0
- package/dist/icon-BGuizDwk.cjs +9 -0
- package/dist/{if-defined-D3lgJqT7.js → if-defined-BWZGb3bh.js} +1 -1
- package/dist/{if-defined-CkVc_RJD.cjs → if-defined-Bc9-_I01.cjs} +1 -1
- package/dist/index.d.ts +8 -7
- package/dist/input-element-BcFmygSF.js +707 -0
- package/dist/input-element-j9znzLWz.cjs +1 -0
- package/dist/{input-wrapper-DVjNwf8-.cjs → input-wrapper-BsQ7oFMd.cjs} +1 -1
- package/dist/input-wrapper-CDgenrYA.js +6 -0
- package/dist/{input-wrapper-CQzXG44g.js → input-wrapper-CKJU0QWG.js} +8 -8
- package/dist/{link-CyiVlb-7.cjs → link-Da3pZ_CW.cjs} +1 -1
- package/dist/{link-DSSJYrtn.js → link-DzZCw8j2.js} +9 -16
- package/dist/{linkcard-fH9uydjS.cjs → linkcard-BM23gzhS.cjs} +1 -1
- package/dist/{linkcard-g8JtooPU.js → linkcard-RIK5xqbd.js} +4 -4
- package/dist/{listbox-L-iOSF7M.cjs → listbox-CsGiqzD0.cjs} +1 -1
- package/dist/{listbox-n4wjlLqD.js → listbox-DlJevu8O.js} +5 -5
- package/dist/{loader-Bzf1sPSg.js → loader-BVvBzaPI.js} +5 -5
- package/dist/{loader-C-3l7kb9.cjs → loader-Bo8RCbCJ.cjs} +1 -1
- package/dist/{messagebox---xPIAwR.cjs → messagebox-C76IcXTl.cjs} +1 -1
- package/dist/{messagebox-okJLeSpj.js → messagebox-DwdMXoAe.js} +6 -16
- package/dist/{modal-pohCsr_x.js → modal-BGXk3f9u.js} +6 -16
- package/dist/{modal-IjDRQfX1.cjs → modal-Cdz9JcCX.cjs} +1 -1
- package/dist/pkt-accordion.cjs +1 -1
- package/dist/pkt-accordion.js +2 -2
- package/dist/pkt-alert.cjs +1 -1
- package/dist/pkt-alert.js +1 -1
- package/dist/pkt-backlink.cjs +1 -1
- package/dist/pkt-backlink.js +1 -1
- package/dist/pkt-button.cjs +1 -1
- package/dist/pkt-button.js +1 -1
- package/dist/pkt-calendar.cjs +1 -1
- package/dist/pkt-calendar.js +1 -1
- package/dist/pkt-card.cjs +1 -1
- package/dist/pkt-card.js +1 -1
- package/dist/pkt-checkbox.cjs +1 -1
- package/dist/pkt-checkbox.js +1 -1
- package/dist/pkt-combobox.cjs +1 -1
- package/dist/pkt-combobox.js +1 -1
- package/dist/pkt-consent.cjs +1 -1
- package/dist/pkt-consent.js +1 -1
- package/dist/pkt-datepicker.cjs +1 -1
- package/dist/pkt-datepicker.js +2 -2
- 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 +29 -29
- package/dist/pkt-input-wrapper.cjs +1 -1
- package/dist/pkt-input-wrapper.js +1 -1
- package/dist/pkt-link.cjs +1 -1
- package/dist/pkt-link.js +1 -1
- package/dist/pkt-linkcard.cjs +1 -1
- package/dist/pkt-linkcard.js +1 -1
- package/dist/pkt-listbox.cjs +1 -1
- package/dist/pkt-listbox.js +1 -1
- package/dist/pkt-loader.cjs +1 -1
- package/dist/pkt-loader.js +1 -1
- package/dist/pkt-messagebox.cjs +1 -1
- package/dist/pkt-messagebox.js +1 -1
- package/dist/pkt-modal.cjs +1 -1
- package/dist/pkt-modal.js +1 -1
- package/dist/pkt-progressbar.cjs +1 -1
- package/dist/pkt-progressbar.js +2 -2
- package/dist/pkt-radiobutton.cjs +1 -1
- package/dist/pkt-radiobutton.js +1 -1
- package/dist/pkt-select.cjs +1 -1
- package/dist/pkt-select.js +1 -1
- package/dist/pkt-tag.cjs +1 -1
- package/dist/pkt-tag.js +1 -1
- package/dist/pkt-textarea.cjs +1 -1
- package/dist/pkt-textarea.js +1 -1
- package/dist/pkt-textinput.cjs +1 -1
- package/dist/pkt-textinput.js +1 -1
- package/dist/{progressbar-DjsupQ7Y.js → progressbar-BbVei20_.js} +7 -7
- package/dist/{progressbar-DJzEC7cx.cjs → progressbar-CazcIzVT.cjs} +2 -2
- package/dist/{radiobutton-DEboKECm.cjs → radiobutton-D1fihs8R.cjs} +1 -1
- package/dist/{radiobutton-Bz_qApF3.js → radiobutton-DODROIBF.js} +5 -5
- package/dist/{ref-BfgcOXko.cjs → ref-BFa5Utho.cjs} +1 -1
- package/dist/{ref-BCGCor-j.js → ref-Xa5dbh--.js} +2 -2
- package/dist/repeat-BZb41H64.cjs +5 -0
- package/dist/{repeat-B6qPUgAq.js → repeat-CJ79egkN.js} +8 -8
- package/dist/{select-DKkoxmgj.js → select-BG2MBQbh.js} +6 -6
- package/dist/{select-DynzsPo0.cjs → select-D-m1PhpA.cjs} +1 -1
- package/dist/{state-CPQXJ4Ct.js → state-DS_kr2Fy.js} +1 -1
- package/dist/{state-BkE_Rxl7.cjs → state-DSjcvzDN.cjs} +1 -1
- package/dist/{tag-NZ5oeGfw.js → tag-CqMgt01I.js} +7 -20
- package/dist/{tag-BKq07hGI.cjs → tag-EFUKrc8q.cjs} +2 -2
- package/dist/{textarea-COG1CH_s.js → textarea-DCKKhs1B.js} +9 -9
- package/dist/{textarea-BS1tgktz.cjs → textarea-aUG3S7C2.cjs} +1 -1
- package/dist/{textinput-CTOtfcTR.js → textinput-B5Ai5R8L.js} +8 -8
- package/dist/{textinput-CCK8ti2y.cjs → textinput-mUERucRy.cjs} +1 -1
- package/package.json +14 -6
- package/src/components/combobox/combobox.ts +1 -1
- package/src/components/icon/icon.ts +17 -8
- package/src/components/select/select.ts +1 -1
- package/dist/calendar-DH-fCGyW.cjs +0 -115
- package/dist/class-map-CG3vIaNm.cjs +0 -5
- package/dist/directive-helpers-_qHew-gi.cjs +0 -5
- package/dist/directive-helpers-cAOIHg9K.js +0 -45
- package/dist/icon-B1-mkmwB.js +0 -88
- package/dist/icon-__Hjt2XZ.cjs +0 -9
- package/dist/input-element-DQOVrqUZ.js +0 -703
- package/dist/input-element-Y8sdrq9C.cjs +0 -1
- package/dist/input-wrapper-8iKEzDRZ.js +0 -40
- package/dist/repeat-DzibMwhi.cjs +0 -5
package/dist/pkt-link.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./link-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./link-Da3pZ_CW.cjs"),t=e.PktLink;Object.defineProperty(exports,"PktLink",{enumerable:!0,get:()=>e.PktLink});exports.default=t;
|
package/dist/pkt-link.js
CHANGED
package/dist/pkt-linkcard.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./linkcard-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./linkcard-BM23gzhS.cjs"),t=e.PktLinkCard;Object.defineProperty(exports,"PktLinkCard",{enumerable:!0,get:()=>e.PktLinkCard});exports.default=t;
|
package/dist/pkt-linkcard.js
CHANGED
package/dist/pkt-listbox.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./listbox-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./listbox-CsGiqzD0.cjs"),t=e.PktListbox;Object.defineProperty(exports,"PktListbox",{enumerable:!0,get:()=>e.PktListbox});exports.default=t;
|
package/dist/pkt-listbox.js
CHANGED
package/dist/pkt-loader.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./loader-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./loader-Bo8RCbCJ.cjs"),t=e.PktLoader;Object.defineProperty(exports,"PktLoader",{enumerable:!0,get:()=>e.PktLoader});exports.default=t;
|
package/dist/pkt-loader.js
CHANGED
package/dist/pkt-messagebox.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./messagebox
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./messagebox-C76IcXTl.cjs"),t=e.PktMessagebox;Object.defineProperty(exports,"PktMessagebox",{enumerable:!0,get:()=>e.PktMessagebox});exports.default=t;
|
package/dist/pkt-messagebox.js
CHANGED
package/dist/pkt-modal.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./modal-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./modal-Cdz9JcCX.cjs"),t=e.PktModal;Object.defineProperty(exports,"PktModal",{enumerable:!0,get:()=>e.PktModal});exports.default=t;
|
package/dist/pkt-modal.js
CHANGED
package/dist/pkt-progressbar.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./progressbar-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./progressbar-CazcIzVT.cjs");Object.defineProperty(exports,"PktProgressbar",{enumerable:!0,get:()=>e.PktProgressbar});exports.default=e.PktProgressbar$1;
|
package/dist/pkt-progressbar.js
CHANGED
package/dist/pkt-radiobutton.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./radiobutton-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./radiobutton-D1fihs8R.cjs"),e=t.PktRadioButton;Object.defineProperty(exports,"PktRadioButton",{enumerable:!0,get:()=>t.PktRadioButton});exports.default=e;
|
package/dist/pkt-radiobutton.js
CHANGED
package/dist/pkt-select.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./select-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./select-D-m1PhpA.cjs"),t=e.PktSelect;Object.defineProperty(exports,"PktSelect",{enumerable:!0,get:()=>e.PktSelect});exports.default=t;
|
package/dist/pkt-select.js
CHANGED
package/dist/pkt-tag.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./tag-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./tag-EFUKrc8q.cjs"),t=e.PktTag;Object.defineProperty(exports,"PktTag",{enumerable:!0,get:()=>e.PktTag});exports.default=t;
|
package/dist/pkt-tag.js
CHANGED
package/dist/pkt-textarea.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./textarea-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./textarea-aUG3S7C2.cjs"),t=e.PktTextarea;Object.defineProperty(exports,"PktTextarea",{enumerable:!0,get:()=>e.PktTextarea});exports.default=t;
|
package/dist/pkt-textarea.js
CHANGED
package/dist/pkt-textinput.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./textinput-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./textinput-mUERucRy.cjs"),t=e.PktTextinput;Object.defineProperty(exports,"PktTextinput",{enumerable:!0,get:()=>e.PktTextinput});exports.default=t;
|
package/dist/pkt-textinput.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { e as n } from "./class-map-
|
|
2
|
-
import { T as g, P as _, E as c, x as b, n as u, a as $ } from "./element-
|
|
3
|
-
import { r as h } from "./state-
|
|
4
|
-
import { e as y, n as A } from "./ref-
|
|
1
|
+
import { e as n } from "./class-map-wy7PUk0P.js";
|
|
2
|
+
import { T as g, P as _, E as c, x as b, n as u, a as $ } from "./element-CRDRygXu.js";
|
|
3
|
+
import { r as h } from "./state-DS_kr2Fy.js";
|
|
4
|
+
import { e as y, n as A } from "./ref-Xa5dbh--.js";
|
|
5
5
|
import { e as x, i as T, t as k } from "./directive-oAbCiebi.js";
|
|
6
6
|
import { u as d } from "./stringutils-DJjRa8dG.js";
|
|
7
|
-
import "./icon-
|
|
7
|
+
import "./icon-1dy7UZcu.js";
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2018 Google LLC
|
|
@@ -16,10 +16,10 @@ const v = "important", C = " !" + v, M = x(class extends T {
|
|
|
16
16
|
if (super(t), t.type !== k.ATTRIBUTE || t.name !== "style" || ((e = t.strings) == null ? void 0 : e.length) > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
|
|
17
17
|
}
|
|
18
18
|
render(t) {
|
|
19
|
-
return Object.keys(t).reduce((e, a) => {
|
|
19
|
+
return Object.keys(t).reduce(((e, a) => {
|
|
20
20
|
const s = t[a];
|
|
21
21
|
return s == null ? e : e + `${a = a.includes("-") ? a : a.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g, "-$&").toLowerCase()}:${s};`;
|
|
22
|
-
}, "");
|
|
22
|
+
}), "");
|
|
23
23
|
}
|
|
24
24
|
update(t, [e]) {
|
|
25
25
|
const { style: a } = t.element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";const n=require("./class-map-
|
|
1
|
+
"use strict";const n=require("./class-map-C_erArZz.cjs"),e=require("./element-CJ_QKaki.cjs"),p=require("./state-DSjcvzDN.cjs"),h=require("./ref-BFa5Utho.cjs"),b=require("./directive-C7oCP5Bh.cjs"),d=require("./stringutils-CkVRq4jP.cjs");require("./icon-BGuizDwk.cjs");/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2018 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const c="important",v=" !"+c,f=b.e(class extends b.i{constructor(l){var t;if(super(l),l.type!==b.t.ATTRIBUTE||l.name!=="style"||((t=l.strings)==null?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(l){return Object.keys(l).reduce((t,s)=>{const r=l[s];return r==null?t:t+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`},"")}update(l,[t]){const{style:s}=l.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const r of this.ft)t[r]==null&&(this.ft.delete(r),r.includes("-")?s.removeProperty(r):s[r]=null);for(const r in t){const i=t[r];if(i!=null){this.ft.add(r);const u=typeof i=="string"&&i.endsWith(v);r.includes("-")||u?s.setProperty(r,u?i.slice(0,-11):i,u?c:""):s[r]=i}}return e.T}});var k=Object.defineProperty,m=Object.getOwnPropertyDescriptor,a=(l,t,s,r)=>{for(var i=r>1?void 0:r?m(t,s):t,u=l.length-1,o;u>=0;u--)(o=l[u])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&k(t,s,i),i};exports.PktProgressbar=class extends e.PktElement{constructor(){super(),this.ariaLabel=null,this.ariaLabelledby=null,this.ariaValueText=null,this.ariaLive="polite",this.id=d.uuidish(),this.role="progressbar",this.skin="dark-blue",this.statusPlacement="following",this.statusType="none",this.title="",this.titlePosition="left",this.valueCurrent=0,this.valueMax=100,this.valueMin=0,this.labelWidth=0,this.progressbarId=this.id,this.computedAriaLabelledby=null,this.computedAriaValueText="",this.labelRef=h.e(),this.progressBarRef=h.e()}firstUpdated(t){super.firstUpdated(t),this.setComputedValues(),this.syncAttributes()}updated(t){super.updated(t),t.has("valueCurrent")&&this.labelRef.value&&(this.labelWidth=this.labelRef.value.getBoundingClientRect().width||0),t.has("id")&&this.id&&(this.progressBarId=this.id),(t.has("statusType")||t.has("id")||t.has("ariaLabelledby"))&&(this.progressbarId=this.id||d.uuidish(),this.computedAriaLabelledby=this.ariaLabelledby||`${this.progressbarId}-title`),(t.has("ariaValueText")||t.has("valueCurrent")||t.has("valueMax"))&&(this.computedAriaValueText=this.statusType==="fraction"&&!this.ariaValueText?`${this.valueCurrent} av ${this.valueMax-this.valueMin}`:this.ariaValueText||""),this.syncAttributes()}render(){const t=this.statusType!=="none",s=this.valueMax-this.valueMin,r=this.valueCurrent/s*100,i=this.statusType==="fraction"?Math.round(r):Math.round((this.valueCurrent-this.valueMin)/(this.valueMax-this.valueMin)*100),u=`${this.valueCurrent} av ${s}`,o=n.e({"pkt-progressbar__bar":!0,[`pkt-progressbar__bar--${this.skin}`]:!!this.skin}),g=n.e({"pkt-progressbar__title":!0,"pkt-progressbar__title-center":this.titlePosition==="center"}),y=n.e({"pkt-progressbar__status":!0,"pkt-progressbar__status--center":this.statusPlacement==="center"}),P=n.e({"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.x` <div
|
|
5
|
+
*/const c="important",v=" !"+c,f=b.e(class extends b.i{constructor(l){var t;if(super(l),l.type!==b.t.ATTRIBUTE||l.name!=="style"||((t=l.strings)==null?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(l){return Object.keys(l).reduce(((t,s)=>{const r=l[s];return r==null?t:t+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`}),"")}update(l,[t]){const{style:s}=l.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const r of this.ft)t[r]==null&&(this.ft.delete(r),r.includes("-")?s.removeProperty(r):s[r]=null);for(const r in t){const i=t[r];if(i!=null){this.ft.add(r);const u=typeof i=="string"&&i.endsWith(v);r.includes("-")||u?s.setProperty(r,u?i.slice(0,-11):i,u?c:""):s[r]=i}}return e.T}});var k=Object.defineProperty,m=Object.getOwnPropertyDescriptor,a=(l,t,s,r)=>{for(var i=r>1?void 0:r?m(t,s):t,u=l.length-1,o;u>=0;u--)(o=l[u])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&k(t,s,i),i};exports.PktProgressbar=class extends e.PktElement{constructor(){super(),this.ariaLabel=null,this.ariaLabelledby=null,this.ariaValueText=null,this.ariaLive="polite",this.id=d.uuidish(),this.role="progressbar",this.skin="dark-blue",this.statusPlacement="following",this.statusType="none",this.title="",this.titlePosition="left",this.valueCurrent=0,this.valueMax=100,this.valueMin=0,this.labelWidth=0,this.progressbarId=this.id,this.computedAriaLabelledby=null,this.computedAriaValueText="",this.labelRef=h.e(),this.progressBarRef=h.e()}firstUpdated(t){super.firstUpdated(t),this.setComputedValues(),this.syncAttributes()}updated(t){super.updated(t),t.has("valueCurrent")&&this.labelRef.value&&(this.labelWidth=this.labelRef.value.getBoundingClientRect().width||0),t.has("id")&&this.id&&(this.progressBarId=this.id),(t.has("statusType")||t.has("id")||t.has("ariaLabelledby"))&&(this.progressbarId=this.id||d.uuidish(),this.computedAriaLabelledby=this.ariaLabelledby||`${this.progressbarId}-title`),(t.has("ariaValueText")||t.has("valueCurrent")||t.has("valueMax"))&&(this.computedAriaValueText=this.statusType==="fraction"&&!this.ariaValueText?`${this.valueCurrent} av ${this.valueMax-this.valueMin}`:this.ariaValueText||""),this.syncAttributes()}render(){const t=this.statusType!=="none",s=this.valueMax-this.valueMin,r=this.valueCurrent/s*100,i=this.statusType==="fraction"?Math.round(r):Math.round((this.valueCurrent-this.valueMin)/(this.valueMax-this.valueMin)*100),u=`${this.valueCurrent} av ${s}`,o=n.e({"pkt-progressbar__bar":!0,[`pkt-progressbar__bar--${this.skin}`]:!!this.skin}),g=n.e({"pkt-progressbar__title":!0,"pkt-progressbar__title-center":this.titlePosition==="center"}),y=n.e({"pkt-progressbar__status":!0,"pkt-progressbar__status--center":this.statusPlacement==="center"}),P=n.e({"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.x` <div
|
|
6
6
|
class="pkt-progressbar__container"
|
|
7
7
|
.ref=${this.progressBarRef}
|
|
8
8
|
style=${f({"--pkt-progress-label-width":`${this.labelWidth}px`,"--pkt-progress-width":`${i}%`})}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("./element-
|
|
1
|
+
"use strict";const t=require("./element-CJ_QKaki.cjs"),r=require("./state-DSjcvzDN.cjs"),u=require("./input-element-j9znzLWz.cjs"),h=require("./ref-BFa5Utho.cjs"),c=require("./class-map-C_erArZz.cjs");var d=Object.defineProperty,k=Object.getOwnPropertyDescriptor,i=(p,e,n,a)=>{for(var s=a>1?void 0:a?k(e,n):e,o=p.length-1,l;o>=0;o--)(l=p[o])&&(s=(a?l(e,n,s):l(s))||s);return a&&s&&d(e,n,s),s};exports.PktRadioButton=class extends u.PktInputElement{constructor(){super(...arguments),this.inputRef=h.e(),this.value="",this.checkHelptext=null,this.defaultChecked=!1,this.hasTile=!1,this.checked=null,this.type="radio",this.tagText=null,this.optionalTag=!1,this.optionalText="Valgfritt",this.requiredTag=!1,this.requiredText="Må fylles ut",this._checked=!1}connectedCallback(){super.connectedCallback()}attributeChangedCallback(e,n,a){e==="defaultChecked"&&(this._checked=this.defaultChecked),e==="checked"&&(this._checked=this.checked===""||this.checked==="true"||this.checked===!0),super.attributeChangedCallback(e,n,a)}render(){const e=c.e({"pkt-input-check__input":!0,"pkt-input-check__input--tile":this.hasTile,"pkt-input-check__input--tile-disabled":this.disabled&&this.hasTile}),n=c.e({"pkt-input-check__input-checkbox":!0,"pkt-input-check__input-checkbox--error":this.hasError}),a=c.e({"pkt-input-check__input-label":!0,"pkt-input-check__input-label--disabled":this.disabled,"pkt-sr-only":this.hideLabel}),s="pkt-tag pkt-tag--small pkt-tag--thin-text",o=()=>t.x`
|
|
2
2
|
${this.tagText?t.x`<span class=${s+" pkt-tag--gray"}>${this.tagText}</span>`:t.E}
|
|
3
3
|
${this.optionalTag?t.x`<span class=${s+" pkt-tag--blue-light"}>${this.optionalText}</span>`:t.E}
|
|
4
4
|
${this.requiredTag?t.x`<span class=${s+" pkt-tag--beige"}>${this.requiredText}</span>`:t.E}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { x as h, E as n, n as s, a as d } from "./element-
|
|
2
|
-
import { r as k } from "./state-
|
|
3
|
-
import { P as f } from "./input-element-
|
|
4
|
-
import { e as g, n as y } from "./ref-
|
|
5
|
-
import { e as u } from "./class-map-
|
|
1
|
+
import { x as h, E as n, n as s, a as d } from "./element-CRDRygXu.js";
|
|
2
|
+
import { r as k } from "./state-DS_kr2Fy.js";
|
|
3
|
+
import { P as f } from "./input-element-BcFmygSF.js";
|
|
4
|
+
import { e as g, n as y } from "./ref-Xa5dbh--.js";
|
|
5
|
+
import { e as u } from "./class-map-wy7PUk0P.js";
|
|
6
6
|
var $ = Object.defineProperty, b = Object.getOwnPropertyDescriptor, i = (e, p, c, l) => {
|
|
7
7
|
for (var a = l > 1 ? void 0 : l ? b(p, c) : p, r = e.length - 1, o; r >= 0; r--)
|
|
8
8
|
(o = e[r]) && (a = (l ? o(p, c, a) : o(a)) || a);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const d=require("./element-
|
|
1
|
+
"use strict";const d=require("./element-CJ_QKaki.cjs"),a=require("./directive-helpers-4oOjKnGY.cjs"),l=require("./directive-C7oCP5Bh.cjs");/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as l } from "./element-
|
|
2
|
-
import { f as $ } from "./directive-helpers-
|
|
1
|
+
import { E as l } from "./element-CRDRygXu.js";
|
|
2
|
+
import { f as $ } from "./directive-helpers-BzAtj9by.js";
|
|
3
3
|
import { i as f, t as a, e as _ } from "./directive-oAbCiebi.js";
|
|
4
4
|
/**
|
|
5
5
|
* @license
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";const m=require("./element-CJ_QKaki.cjs"),x=require("./directive-C7oCP5Bh.cjs"),r=require("./directive-helpers-4oOjKnGY.cjs");/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2017 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/const k=(l,v,d)=>{const h=new Map;for(let e=v;e<=d;e++)h.set(l[e],e);return h},q=x.e(class extends x.i{constructor(l){if(super(l),l.type!==x.t.CHILD)throw Error("repeat() can only be used in text expressions")}dt(l,v,d){let h;d===void 0?d=v:v!==void 0&&(h=v);const e=[],u=[];let n=0;for(const c of l)e[n]=h?h(c,n):n,u[n]=d(c,n),n++;return{values:u,keys:e}}render(l,v,d){return this.dt(l,v,d).values}update(l,[v,d,h]){const e=r.p(l),{values:u,keys:n}=this.dt(v,d,h);if(!Array.isArray(e))return this.ut=n,u;const c=this.ut??(this.ut=[]),f=[];let p,M,t=0,i=e.length-1,s=0,o=u.length-1;for(;t<=i&&s<=o;)if(e[t]===null)t++;else if(e[i]===null)i--;else if(c[t]===n[s])f[s]=r.v(e[t],u[s]),t++,s++;else if(c[i]===n[o])f[o]=r.v(e[i],u[o]),i--,o--;else if(c[t]===n[o])f[o]=r.v(e[t],u[o]),r.s(l,f[o+1],e[t]),t++,o--;else if(c[i]===n[s])f[s]=r.v(e[i],u[s]),r.s(l,e[t],e[i]),i--,s++;else if(p===void 0&&(p=k(n,s,o),M=k(c,t,i)),p.has(c[t]))if(p.has(c[i])){const a=M.get(n[s]),y=a!==void 0?e[a]:null;if(y===null){const g=r.s(l,e[t]);r.v(g,u[s]),f[s]=g}else f[s]=r.v(y,u[s]),r.s(l,e[t],y),e[a]=null;s++}else r.M(e[i]),i--;else r.M(e[t]),t++;for(;s<=o;){const a=r.s(l,f[o+1]);r.v(a,u[s]),f[s++]=a}for(;t<=i;){const a=e[t++];a!==null&&r.M(a)}return this.ut=n,r.m(l,f),m.T}});exports.c=q;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as
|
|
2
|
-
import { e as
|
|
3
|
-
import { p as
|
|
1
|
+
import { T as A } from "./element-CRDRygXu.js";
|
|
2
|
+
import { e as M, i as b, t as j } from "./directive-oAbCiebi.js";
|
|
3
|
+
import { p as C, v as h, s as v, M as x, m as D } from "./directive-helpers-BzAtj9by.js";
|
|
4
4
|
/**
|
|
5
5
|
* @license
|
|
6
6
|
* Copyright 2017 Google LLC
|
|
@@ -10,9 +10,9 @@ const w = (s, c, a) => {
|
|
|
10
10
|
const p = /* @__PURE__ */ new Map();
|
|
11
11
|
for (let e = c; e <= a; e++) p.set(s[e], e);
|
|
12
12
|
return p;
|
|
13
|
-
},
|
|
13
|
+
}, L = M(class extends b {
|
|
14
14
|
constructor(s) {
|
|
15
|
-
if (super(s), s.type !==
|
|
15
|
+
if (super(s), s.type !== j.CHILD) throw Error("repeat() can only be used in text expressions");
|
|
16
16
|
}
|
|
17
17
|
dt(s, c, a) {
|
|
18
18
|
let p;
|
|
@@ -26,7 +26,7 @@ const w = (s, c, a) => {
|
|
|
26
26
|
return this.dt(s, c, a).values;
|
|
27
27
|
}
|
|
28
28
|
update(s, [c, a, p]) {
|
|
29
|
-
const e =
|
|
29
|
+
const e = C(s), { values: i, keys: l } = this.dt(c, a, p);
|
|
30
30
|
if (!Array.isArray(e)) return this.ut = l, i;
|
|
31
31
|
const u = this.ut ?? (this.ut = []), f = [];
|
|
32
32
|
let m, g, t = 0, o = e.length - 1, r = 0, n = i.length - 1;
|
|
@@ -53,9 +53,9 @@ const w = (s, c, a) => {
|
|
|
53
53
|
const d = e[t++];
|
|
54
54
|
d !== null && x(d);
|
|
55
55
|
}
|
|
56
|
-
return this.ut = l,
|
|
56
|
+
return this.ut = l, D(s, f), A;
|
|
57
57
|
}
|
|
58
58
|
});
|
|
59
59
|
export {
|
|
60
|
-
|
|
60
|
+
L as c
|
|
61
61
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { x as r, n as c, a as v } from "./element-
|
|
2
|
-
import { r as f } from "./state-
|
|
3
|
-
import { e as u, n as d } from "./ref-
|
|
4
|
-
import { o as l } from "./if-defined-
|
|
5
|
-
import { P as _ } from "./input-element-
|
|
1
|
+
import { x as r, n as c, a as v } from "./element-CRDRygXu.js";
|
|
2
|
+
import { r as f } from "./state-DS_kr2Fy.js";
|
|
3
|
+
import { e as u, n as d } from "./ref-Xa5dbh--.js";
|
|
4
|
+
import { o as l } from "./if-defined-BWZGb3bh.js";
|
|
5
|
+
import { P as _ } from "./input-element-BcFmygSF.js";
|
|
6
6
|
import { P as x } from "./pkt-options-controller-CZO1nxZ8.js";
|
|
7
7
|
import { P as b } from "./pkt-slot-controller-BPGj-LC5.js";
|
|
8
|
-
import "./input-wrapper-
|
|
8
|
+
import "./input-wrapper-CKJU0QWG.js";
|
|
9
9
|
var $ = Object.defineProperty, m = Object.getOwnPropertyDescriptor, a = (t, e, s, i) => {
|
|
10
10
|
for (var o = i > 1 ? void 0 : i ? m(e, s) : e, n = t.length - 1, p; n >= 0; n--)
|
|
11
11
|
(p = t[n]) && (o = (i ? p(e, s, o) : p(o)) || o);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const h=require("./element-
|
|
1
|
+
"use strict";const h=require("./element-CJ_QKaki.cjs"),u=require("./state-DSjcvzDN.cjs"),r=require("./ref-BFa5Utho.cjs"),o=require("./if-defined-Bc9-_I01.cjs"),d=require("./input-element-j9znzLWz.cjs"),c=require("./pkt-options-controller-CiuBG6Lt.cjs"),v=require("./pkt-slot-controller-BzddBp7z.cjs");require("./input-wrapper-BsQ7oFMd.cjs");var f=Object.defineProperty,_=Object.getOwnPropertyDescriptor,a=(p,t,e,s)=>{for(var i=s>1?void 0:s?_(t,e):t,l=p.length-1,n;l>=0;l--)(n=p[l])&&(i=(s?n(t,e,i):n(i))||i);return s&&i&&f(t,e,i),i};exports.PktSelect=class extends d.PktInputElement{constructor(){super(),this.inputRef=r.e(),this.helptextSlot=r.e(),this._optionsProp=[],this.value="",this._options=[],this.selectedIndex=-1,this.selectedOptions=void 0,this.optionsController=new c.PktOptionsSlotController(this),this.slotController=new v.PktSlotController(this,this.helptextSlot),this.slotController.skipOptions=!0}get options(){return this._options.map(t=>({...t,selected:t.value===this.value}))}set options(t){this._optionsProp=t,this.requestUpdate("_optionsProp",this._options)}connectedCallback(){super.connectedCallback();const t=this._optionsProp.length>0,e=this.optionsController.nodes.length&&this.optionsController.nodes.length>0;!t&&e?this.optionsController.nodes.forEach(s=>{const i={value:s.hasAttribute("value")?s.getAttribute("value")??"":s.textContent??"",label:s.textContent||s.getAttribute("value")||"",disabled:s.hasAttribute("disabled"),selected:s.hasAttribute("selected"),hidden:s.hasAttribute("data-hidden")};s.getAttribute("selected")&&!this.value&&(this.value=i.value),this._options.push(i)}):(this._options=this._optionsProp,this._options.forEach(s=>{s.selected&&!this.value&&(this.value=s.value)}))}add(t,e){const s={value:t.value||t.text,label:t.text||t.value,selected:t.selected,disabled:t.disabled};if(e===void 0)this._options.push(s);else if(typeof e=="number")this._options.splice(e,0,s);else{const i=e.value||e.text,l=this._options.findIndex(n=>n.value===i);l>=0?this._options.splice(l,0,s):this._options.push(s)}t.selected&&(this.value=t.value||t.text,this.selectedIndex=this._options.findIndex(i=>i.value===this.value)),this.requestUpdate()}remove(t){var e;typeof t=="number"&&(this.selectedIndex===t&&(this.value=((e=this._options[0])==null?void 0:e.value)||""),this._options.splice(t,1),this.requestUpdate())}item(t){var e;return(e=this.inputRef.value)==null?void 0:e.item(t)}namedItem(t){var e;return(e=this.inputRef.value)==null?void 0:e.namedItem(t)}showPicker(){this.inputRef.value&&"showPicker"in this.inputRef.value&&this.inputRef.value.showPicker()}attributeChangedCallback(t,e,s){var i,l;t==="options"&&(this._options=s?JSON.parse(s):[]),t==="value"&&this.value!==e&&(this.selectedIndex=this.touched?this.returnNumberOrNull((i=this.inputRef.value)==null?void 0:i.selectedIndex):this._options.findIndex(n=>n.value===s),this.selectedOptions=(l=this.inputRef.value)==null?void 0:l.selectedOptions,this.valueChanged(s,e)),super.attributeChangedCallback(t,e,s)}update(t){var e,s;super.update(t),t.has("_optionsProp")&&this._optionsProp.length>0&&(this._options=this._optionsProp,this.requestUpdate("_options"),!this.value&&this._options.length>0&&(this.value=this._options[0].value,this.selectedIndex=0)),t.has("value")&&this.value!==t.get("value")&&(this.selectedIndex=this.touched?this.returnNumberOrNull((e=this.inputRef.value)==null?void 0:e.selectedIndex):this._options.findIndex(i=>i.value===this.value),this.selectedOptions=(s=this.inputRef.value)==null?void 0:s.selectedOptions,this.valueChanged(this.value,t.get("value"))),t.has("id")&&!this.name&&this.id&&(this.name=this.id)}firstUpdated(t){var e;super.firstUpdated(t),this._optionsProp.length&&(this._options=this._optionsProp),!this.value&&this._options.length>0?(this.value=this._options[0].value,this.selectedIndex=0):this.selectedIndex=this._options.findIndex(s=>s.value===this.value),this.selectedOptions=(e=this.inputRef.value)==null?void 0:e.selectedOptions}render(){const t=`pkt-input ${this.fullwidth?"pkt-input--fullwidth":""}`;return h.x`
|
|
2
2
|
<pkt-input-wrapper
|
|
3
3
|
?counter=${this.counter}
|
|
4
4
|
?disabled=${this.disabled}
|
|
@@ -1,24 +1,11 @@
|
|
|
1
|
-
import { e as u } from "./class-map-
|
|
2
|
-
import { P as m, x as l, n as r, a as g } from "./element-
|
|
3
|
-
import { r as k } from "./state-
|
|
1
|
+
import { e as u } from "./class-map-wy7PUk0P.js";
|
|
2
|
+
import { P as m, x as l, n as r, a as g } from "./element-CRDRygXu.js";
|
|
3
|
+
import { r as k } from "./state-DS_kr2Fy.js";
|
|
4
4
|
import { P as y } from "./pkt-slot-controller-BPGj-LC5.js";
|
|
5
|
-
import { e as b, n as f } from "./ref-
|
|
6
|
-
import "./icon-
|
|
7
|
-
import { o as d } from "./if-defined-
|
|
8
|
-
const _ = {
|
|
9
|
-
size: {
|
|
10
|
-
default: "medium"
|
|
11
|
-
},
|
|
12
|
-
skin: {
|
|
13
|
-
default: "blue"
|
|
14
|
-
},
|
|
15
|
-
closeTag: {
|
|
16
|
-
default: !1
|
|
17
|
-
},
|
|
18
|
-
type: {
|
|
19
|
-
default: "button"
|
|
20
|
-
}
|
|
21
|
-
}, n = {
|
|
5
|
+
import { e as b, n as f } from "./ref-Xa5dbh--.js";
|
|
6
|
+
import "./icon-1dy7UZcu.js";
|
|
7
|
+
import { o as d } from "./if-defined-BWZGb3bh.js";
|
|
8
|
+
const _ = { size: { default: "medium" }, skin: { default: "blue" }, closeTag: { default: !1 }, type: { default: "button" } }, n = {
|
|
22
9
|
props: _
|
|
23
10
|
};
|
|
24
11
|
var $ = Object.defineProperty, S = Object.getOwnPropertyDescriptor, e = (s, i, p, o) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";const u=require("./class-map-
|
|
1
|
+
"use strict";const u=require("./class-map-C_erArZz.cjs"),t=require("./element-CJ_QKaki.cjs"),k=require("./state-DSjcvzDN.cjs"),g=require("./pkt-slot-controller-BzddBp7z.cjs"),c=require("./ref-BFa5Utho.cjs");require("./icon-BGuizDwk.cjs");const h=require("./if-defined-Bc9-_I01.cjs"),f={size:{default:"medium"},skin:{default:"blue"},closeTag:{default:!1},type:{default:"button"}},r={props:f};var d=Object.defineProperty,y=Object.getOwnPropertyDescriptor,i=(n,e,a,o)=>{for(var s=o>1?void 0:o?y(e,a):e,l=n.length-1,p;l>=0;l--)(p=n[l])&&(s=(o?p(e,a,s):p(s))||s);return o&&s&&d(e,a,s),s};exports.PktTag=class extends t.PktElement{constructor(){super(),this.defaultSlot=c.e(),this.closeTag=r.props.closeTag.default,this.size=r.props.size.default,this.skin=r.props.skin.default,this.textStyle=null,this.iconName=void 0,this.type=r.props.type.default,this.ariaLabel=null,this._isClosed=!1,this._ariaDescription=null,this.close=e=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent("close",{detail:{origin:e},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("on-close",{detail:{origin:e},bubbles:!0,composed:!0}))},this.slotController=new g.PktSlotController(this,this.defaultSlot),this._isClosed=!1}firstUpdated(e){var a,o;if(super.firstUpdated(e),this.closeTag&&!this.ariaLabel){const s=(o=(a=this.defaultSlot.value)==null?void 0:a.textContent)==null?void 0:o.trim();s&&(this._ariaDescription=`Klikk for å fjerne ${s}`)}}render(){const e={"pkt-tag":!0,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,[`pkt-tag--${this.textStyle}`]:!!this.textStyle},a={"pkt-tag":!0,"pkt-btn":!0,"pkt-btn--tertiary":!0,[`pkt-tag--${this.textStyle}`]:!!this.textStyle,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,"pkt-btn--icons-right-and-left":this.closeTag&&!!this.iconName,"pkt-hide":this._isClosed};return this.closeTag?t.x`
|
|
2
2
|
<button
|
|
3
|
-
class=${u.e(
|
|
3
|
+
class=${u.e(a)}
|
|
4
4
|
type=${this.type}
|
|
5
5
|
@click=${this.close}
|
|
6
6
|
aria-label=${h.o(this.ariaLabel||void 0)}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { T as l, E as $, x as f, n as d, a as g } from "./element-
|
|
2
|
-
import { o as u } from "./if-defined-
|
|
3
|
-
import { r as x } from "./state-
|
|
4
|
-
import { e as m, n as c } from "./ref-
|
|
5
|
-
import { e as v } from "./class-map-
|
|
1
|
+
import { T as l, E as $, x as f, n as d, a as g } from "./element-CRDRygXu.js";
|
|
2
|
+
import { o as u } from "./if-defined-BWZGb3bh.js";
|
|
3
|
+
import { r as x } from "./state-DS_kr2Fy.js";
|
|
4
|
+
import { e as m, n as c } from "./ref-Xa5dbh--.js";
|
|
5
|
+
import { e as v } from "./class-map-wy7PUk0P.js";
|
|
6
6
|
import { e as T, i as b, t as a } from "./directive-oAbCiebi.js";
|
|
7
|
-
import { f as y, m as w } from "./directive-helpers-
|
|
8
|
-
import { P as C } from "./input-element-
|
|
7
|
+
import { f as y, m as w } from "./directive-helpers-BzAtj9by.js";
|
|
8
|
+
import { P as C } from "./input-element-BcFmygSF.js";
|
|
9
9
|
import { P as E } from "./pkt-slot-controller-BPGj-LC5.js";
|
|
10
|
-
import "./input-wrapper-
|
|
11
|
-
import "./icon-
|
|
10
|
+
import "./input-wrapper-CKJU0QWG.js";
|
|
11
|
+
import "./icon-1dy7UZcu.js";
|
|
12
12
|
/**
|
|
13
13
|
* @license
|
|
14
14
|
* Copyright 2020 Google LLC
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const s=require("./element-
|
|
1
|
+
"use strict";const s=require("./element-CJ_QKaki.cjs"),p=require("./if-defined-Bc9-_I01.cjs"),c=require("./state-DSjcvzDN.cjs"),l=require("./ref-BFa5Utho.cjs"),$=require("./class-map-C_erArZz.cjs"),a=require("./directive-C7oCP5Bh.cjs"),d=require("./directive-helpers-4oOjKnGY.cjs"),x=require("./input-element-j9znzLWz.cjs"),T=require("./pkt-slot-controller-BzddBp7z.cjs");require("./input-wrapper-BsQ7oFMd.cjs");require("./icon-BGuizDwk.cjs");/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2020 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { E as p, x as h, n as a, a as $ } from "./element-
|
|
2
|
-
import { o as u } from "./if-defined-
|
|
3
|
-
import { r as f } from "./state-
|
|
4
|
-
import { e as d, n as m } from "./ref-
|
|
5
|
-
import { e as g } from "./class-map-
|
|
6
|
-
import { P as x } from "./input-element-
|
|
1
|
+
import { E as p, x as h, n as a, a as $ } from "./element-CRDRygXu.js";
|
|
2
|
+
import { o as u } from "./if-defined-BWZGb3bh.js";
|
|
3
|
+
import { r as f } from "./state-DS_kr2Fy.js";
|
|
4
|
+
import { e as d, n as m } from "./ref-Xa5dbh--.js";
|
|
5
|
+
import { e as g } from "./class-map-wy7PUk0P.js";
|
|
6
|
+
import { P as x } from "./input-element-BcFmygSF.js";
|
|
7
7
|
import { P as v } from "./pkt-slot-controller-BPGj-LC5.js";
|
|
8
|
-
import "./input-wrapper-
|
|
9
|
-
import "./icon-
|
|
8
|
+
import "./input-wrapper-CKJU0QWG.js";
|
|
9
|
+
import "./icon-1dy7UZcu.js";
|
|
10
10
|
var y = Object.defineProperty, b = Object.getOwnPropertyDescriptor, o = (i, e, r, t) => {
|
|
11
11
|
for (var n = t > 1 ? void 0 : t ? b(e, r) : e, l = i.length - 1, c; l >= 0; l--)
|
|
12
12
|
(c = i[l]) && (n = (t ? c(e, r, n) : c(n)) || n);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("./element-
|
|
1
|
+
"use strict";const t=require("./element-CJ_QKaki.cjs"),a=require("./if-defined-Bc9-_I01.cjs"),l=require("./state-DSjcvzDN.cjs"),h=require("./ref-BFa5Utho.cjs"),c=require("./class-map-C_erArZz.cjs"),d=require("./input-element-j9znzLWz.cjs"),x=require("./pkt-slot-controller-BzddBp7z.cjs");require("./input-wrapper-BsQ7oFMd.cjs");require("./icon-BGuizDwk.cjs");var $=Object.defineProperty,f=Object.getOwnPropertyDescriptor,r=(u,i,s,n)=>{for(var e=n>1?void 0:n?f(i,s):i,o=u.length-1,p;o>=0;o--)(p=u[o])&&(e=(n?p(i,s,e):p(e))||e);return n&&e&&$(i,s,e),e};exports.PktTextinput=class extends d.PktInputElement{constructor(){super(),this.inputRef=h.e(),this.helptextSlot=h.e(),this.value="",this.type="text",this.size=null,this.autocomplete=null,this.iconNameRight=null,this.prefix=null,this.suffix=null,this.omitSearchIcon=!1,this.counterCurrent=0,this.slotController=new x.PktSlotController(this,this.helptextSlot)}attributeChangedCallback(i,s,n){i==="value"&&this.value!==s&&(this.counterCurrent=n?n.length:0,this.valueChanged(n,s)),super.attributeChangedCallback(i,s,n)}updated(i){var s;super.updated(i),i.has("value")&&(this.counterCurrent=((s=this.value)==null?void 0:s.length)||0,this.valueChanged(this.value,i.get("value"))),i.has("id")&&!this.name&&this.id&&(this.name=this.id)}render(){const i=this.type==="search"&&!this.iconNameRight&&!this.omitSearchIcon,s=c.e({"pkt-input":!0,"pkt-input--fullwidth":this.fullwidth,"pkt-input--counter-error":this.counter&&this.counterMaxLength&&this.value.length&&this.value.length>this.counterMaxLength}),n=this.ariaLabelledby||`${this.id}-input-label`;return t.x`
|
|
2
2
|
<pkt-input-wrapper
|
|
3
3
|
label="${this.label}"
|
|
4
4
|
?counter=${this.counter}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-elements",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.8.0",
|
|
4
4
|
"description": "Komponentbiblioteket til Punkt, et designsystem laget av Oslo Origo",
|
|
5
5
|
"homepage": "https://punkt.oslo.kommune.no",
|
|
6
6
|
"author": "Team Designsystem, Oslo Origo",
|
|
@@ -21,7 +21,10 @@
|
|
|
21
21
|
"preview": "vite preview --outDir dist-app",
|
|
22
22
|
"test": "vitest",
|
|
23
23
|
"test:run": "vitest run",
|
|
24
|
-
"test:ui": "vitest --ui"
|
|
24
|
+
"test:ui": "vitest --ui",
|
|
25
|
+
"lint": "eslint src/**/*.ts",
|
|
26
|
+
"lint:fix": "eslint src/**/*.ts --fix",
|
|
27
|
+
"type-check": "tsc --noEmit"
|
|
25
28
|
},
|
|
26
29
|
"dependencies": {
|
|
27
30
|
"@date-fns/tz": "^1.2.0",
|
|
@@ -42,15 +45,20 @@
|
|
|
42
45
|
"@oslokommune/punkt-assets": "^13.6.3",
|
|
43
46
|
"@oslokommune/punkt-css": "^13.6.15",
|
|
44
47
|
"@testing-library/jest-dom": "^6.6.3",
|
|
45
|
-
"@
|
|
48
|
+
"@typescript-eslint/eslint-plugin": "^8.46.0",
|
|
49
|
+
"@typescript-eslint/parser": "^8.46.0",
|
|
50
|
+
"@vitest/ui": "^3.2.4",
|
|
51
|
+
"eslint": "^9.37.0",
|
|
52
|
+
"eslint-config-prettier": "^9.1.0",
|
|
53
|
+
"eslint-plugin-lit": "^2.1.1",
|
|
46
54
|
"jest-axe": "^9.0.0",
|
|
47
55
|
"jsdom": "^23.0.0",
|
|
48
56
|
"sass": "^1.78.0",
|
|
49
57
|
"typescript": "^5.6.2",
|
|
50
|
-
"vite": "^
|
|
58
|
+
"vite": "^6.3.6",
|
|
51
59
|
"vite-plugin-dts": "^4.2.1",
|
|
52
60
|
"vite-plugin-web-components-hmr": "^0.1.3",
|
|
53
|
-
"vitest": "^
|
|
61
|
+
"vitest": "^3.2.4"
|
|
54
62
|
},
|
|
55
63
|
"private": false,
|
|
56
64
|
"publishConfig": {
|
|
@@ -72,5 +80,5 @@
|
|
|
72
80
|
"url": "https://github.com/oslokommune/punkt/issues"
|
|
73
81
|
},
|
|
74
82
|
"license": "MIT",
|
|
75
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "291eaf91a93ce286149605e36547068da3bf90e9"
|
|
76
84
|
}
|
|
@@ -92,7 +92,7 @@ export class PktCombobox extends PktInputElement implements IPktCombobox {
|
|
|
92
92
|
@property({ type: String }) tagPlacement: TPktComboboxTagPlacement | null = null
|
|
93
93
|
|
|
94
94
|
// State
|
|
95
|
-
@state()
|
|
95
|
+
@state() _options: IPktComboboxOption[] = []
|
|
96
96
|
@state() private _isOptionsOpen = false
|
|
97
97
|
@state() private _value: string[] = []
|
|
98
98
|
@state() private _userInfoMessage: string = ''
|