@oslokommune/punkt-elements 13.3.1 → 13.4.1
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 +34 -0
- package/dist/{alert-B0OUR9oD.js → alert-B07oUpkq.js} +5 -4
- package/dist/{alert-BH0lJ2ny.cjs → alert-DQNBDKjT.cjs} +1 -1
- package/dist/{backlink-B13JTp9D.js → backlink-C2jbzu0U.js} +16 -15
- package/dist/backlink-JbBNi3qg.cjs +13 -0
- package/dist/{button-CDocR7iN.cjs → button-B8rdtaHB.cjs} +1 -1
- package/dist/{button-DrrEvUy9.js → button-DhispFOY.js} +1 -0
- package/dist/{consent-CftYu8Di.js → consent-BpcQFvbi.js} +1 -1
- package/dist/{consent-DrS71kvz.cjs → consent-hYeFWNFr.cjs} +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-button.cjs +1 -1
- package/dist/pkt-button.js +1 -1
- package/dist/pkt-consent.cjs +1 -1
- package/dist/pkt-consent.js +1 -1
- package/dist/pkt-index.cjs +1 -1
- package/dist/pkt-index.js +4 -4
- package/package.json +15 -4
- package/src/components/accordion/accordion.test.ts +640 -0
- package/src/components/alert/alert.test.ts +348 -0
- package/src/components/alert/alert.ts +1 -0
- package/src/components/backlink/backlink.test.ts +286 -0
- package/src/components/backlink/backlink.ts +5 -3
- package/src/components/button/button.test.ts +514 -0
- package/src/components/button/button.ts +2 -0
- package/dist/backlink-C5jQRMwJ.cjs +0 -13
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,40 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [13.4.1](https://github.com/oslokommune/punkt/compare/13.4.0...13.4.1) (2025-09-03)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
Ingen
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
Ingen
|
|
18
|
+
|
|
19
|
+
### Chores
|
|
20
|
+
Ingen
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [13.4.0](https://github.com/oslokommune/punkt/compare/13.3.1...13.4.0) (2025-09-03)
|
|
26
|
+
|
|
27
|
+
### ⚠ BREAKING CHANGES
|
|
28
|
+
Ingen
|
|
29
|
+
|
|
30
|
+
### Features
|
|
31
|
+
Ingen
|
|
32
|
+
|
|
33
|
+
### Bug Fixes
|
|
34
|
+
Ingen
|
|
35
|
+
|
|
36
|
+
### Chores
|
|
37
|
+
Ingen
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
|
|
8
42
|
## [13.3.0](https://github.com/oslokommune/punkt/compare/13.2.4...13.3.0) (2025-09-01)
|
|
9
43
|
|
|
10
44
|
### ⚠ BREAKING CHANGES
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { e as u } from "./class-map-BpTj9gtz.js";
|
|
2
2
|
import { P as f, E as h, x as p, n as a, a as v } from "./element-CgEWt74-.js";
|
|
3
|
-
import { r as
|
|
4
|
-
import { P as
|
|
3
|
+
import { r as m } from "./state-Bo2bck5_.js";
|
|
4
|
+
import { P as k } from "./pkt-slot-controller-BPGj-LC5.js";
|
|
5
5
|
import { e as _, n as b } from "./ref-BBYSqgeW.js";
|
|
6
6
|
import { u as y } from "./classutils-RQs1k6D9.js";
|
|
7
7
|
import "./icon-CC1js8eR.js";
|
|
8
|
+
import "./button-DhispFOY.js";
|
|
8
9
|
const C = {
|
|
9
10
|
skin: {
|
|
10
11
|
default: "info"
|
|
@@ -34,7 +35,7 @@ let e = class extends f {
|
|
|
34
35
|
), this.dispatchEvent(
|
|
35
36
|
new CustomEvent("on-close", { detail: { origin: t }, bubbles: !0, composed: !0 })
|
|
36
37
|
);
|
|
37
|
-
}, this.slotController = new
|
|
38
|
+
}, this.slotController = new k(this, this.defaultSlot), this._isClosed = !1;
|
|
38
39
|
}
|
|
39
40
|
// Lifecycle
|
|
40
41
|
connectedCallback() {
|
|
@@ -117,7 +118,7 @@ i([
|
|
|
117
118
|
a({ type: String, reflect: !0 })
|
|
118
119
|
], e.prototype, "role", 2);
|
|
119
120
|
i([
|
|
120
|
-
|
|
121
|
+
m()
|
|
121
122
|
], e.prototype, "_isClosed", 2);
|
|
122
123
|
e = i([
|
|
123
124
|
v("pkt-alert")
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const c=require("./class-map-BBG2gMX4.cjs"),t=require("./element-6DBpyGQm.cjs"),d=require("./state-DPobt-Yz.cjs"),h=require("./pkt-slot-controller-BzddBp7z.cjs"),u=require("./ref-iJtiv3o2.cjs"),k=require("./classutils-BwNK82ZQ.cjs");require("./icon-B_ryAy4Q.cjs");const v={skin:{default:"info"},ariaLive:{default:"polite"},compact:{default:!1},closeAlert:{default:!1}},a={props:v};var f=Object.defineProperty,_=Object.getOwnPropertyDescriptor,i=(o,e,s,
|
|
1
|
+
"use strict";const c=require("./class-map-BBG2gMX4.cjs"),t=require("./element-6DBpyGQm.cjs"),d=require("./state-DPobt-Yz.cjs"),h=require("./pkt-slot-controller-BzddBp7z.cjs"),u=require("./ref-iJtiv3o2.cjs"),k=require("./classutils-BwNK82ZQ.cjs");require("./icon-B_ryAy4Q.cjs");require("./button-B8rdtaHB.cjs");const v={skin:{default:"info"},ariaLive:{default:"polite"},compact:{default:!1},closeAlert:{default:!1}},a={props:v};var f=Object.defineProperty,_=Object.getOwnPropertyDescriptor,i=(o,e,s,r)=>{for(var l=r>1?void 0:r?_(e,s):e,p=o.length-1,n;p>=0;p--)(n=o[p])&&(l=(r?n(e,s,l):n(l))||l);return r&&l&&f(e,s,l),l};exports.PktAlert=class extends t.PktElement{constructor(){super(),this.defaultSlot=u.e(),this.compact=a.props.compact.default,this.title="",this.skin=a.props.skin.default,this.ariaLive=a.props.ariaLive.default,this["aria-live"]=null,this.closeAlert=a.props.closeAlert.default,this.date=null,this.role="status",this._isClosed=!1,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 h.PktSlotController(this,this.defaultSlot),this._isClosed=!1}connectedCallback(){super.connectedCallback(),this["aria-live"]=this.getAttribute("aria-live")||this.ariaLive}attributeChangedCallback(e,s,r){e==="ariaLive"&&(this["aria-live"]=r),super.attributeChangedCallback(e,s,r)}updated(e){super.updated(e),e.has("ariaLive")&&(this["aria-live"]=this.ariaLive),e.has("_isClosed")&&k.updateClassAttribute(this,"pkt-hide",this._isClosed)}render(){const e={"pkt-alert":!0,"pkt-alert--compact":this.compact,[`pkt-alert--${this.skin}`]:this.skin,"pkt-hide":this._isClosed},s={"pkt-alert__grid":!0,"pkt-alert__noTitle":!this.title,"pkt-alert__noDate":!this.date};return t.x`
|
|
2
2
|
<div class=${c.e(e)} aria-live=${this["aria-live"]}>
|
|
3
3
|
<div class=${c.e(s)}>
|
|
4
4
|
<pkt-icon
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { P as c, x as k, n as o, a as
|
|
2
|
-
import { o as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { P as c, x as k, n as o, a as h } from "./element-CgEWt74-.js";
|
|
2
|
+
import { o as b } from "./if-defined-CmuO4Vz9.js";
|
|
3
|
+
import "./icon-CC1js8eR.js";
|
|
4
|
+
var f = Object.defineProperty, u = Object.getOwnPropertyDescriptor, l = (t, r, i, s) => {
|
|
5
|
+
for (var e = s > 1 ? void 0 : s ? u(r, i) : r, n = t.length - 1, p; n >= 0; n--)
|
|
6
|
+
(p = t[n]) && (e = (s ? p(r, i, e) : p(e)) || e);
|
|
7
|
+
return s && e && f(r, i, e), e;
|
|
7
8
|
};
|
|
8
9
|
let a = class extends c {
|
|
9
10
|
constructor() {
|
|
@@ -18,7 +19,7 @@ let a = class extends c {
|
|
|
18
19
|
class="pkt-back-link"
|
|
19
20
|
aria-label=${this.ariaLabel || "Gå tilbake til forrige side"}
|
|
20
21
|
>
|
|
21
|
-
<a href=${
|
|
22
|
+
<a href=${b(this.href || "/")} class="pkt-link pkt-link--icon-left"
|
|
22
23
|
><pkt-icon
|
|
23
24
|
class="pkt-back-link__icon pkt-icon pkt-link__icon"
|
|
24
25
|
name="chevron-thin-left"
|
|
@@ -29,17 +30,17 @@ let a = class extends c {
|
|
|
29
30
|
</nav>`;
|
|
30
31
|
}
|
|
31
32
|
};
|
|
32
|
-
|
|
33
|
-
o({ type: String
|
|
33
|
+
l([
|
|
34
|
+
o({ type: String })
|
|
34
35
|
], a.prototype, "href", 2);
|
|
35
|
-
|
|
36
|
-
o({ type: String
|
|
36
|
+
l([
|
|
37
|
+
o({ type: String })
|
|
37
38
|
], a.prototype, "text", 2);
|
|
38
|
-
|
|
39
|
-
o({ type: String
|
|
39
|
+
l([
|
|
40
|
+
o({ type: String })
|
|
40
41
|
], a.prototype, "ariaLabel", 2);
|
|
41
|
-
a =
|
|
42
|
-
|
|
42
|
+
a = l([
|
|
43
|
+
h("pkt-backlink")
|
|
43
44
|
], a);
|
|
44
45
|
export {
|
|
45
46
|
a as P
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";const r=require("./element-6DBpyGQm.cjs"),c=require("./if-defined-Cni-RHLS.cjs");require("./icon-B_ryAy4Q.cjs");var p=Object.defineProperty,o=Object.getOwnPropertyDescriptor,n=(k,t,a,i)=>{for(var e=i>1?void 0:i?o(t,a):t,s=k.length-1,l;s>=0;s--)(l=k[s])&&(e=(i?l(t,a,e):l(e))||e);return i&&e&&p(t,a,e),e};exports.PktBackLink=class extends r.PktElement{constructor(){super(...arguments),this.href="",this.text="Forsiden",this.ariaLabel=""}attributeChangedCallback(t,a,i){t==="arialabel"&&this.removeAttribute("arialabel"),t==="href"&&this.removeAttribute("href"),t==="text"&&this.removeAttribute("text"),super.attributeChangedCallback(t,a,i)}render(){return r.x`<nav
|
|
2
|
+
class="pkt-back-link"
|
|
3
|
+
aria-label=${this.ariaLabel||"Gå tilbake til forrige side"}
|
|
4
|
+
>
|
|
5
|
+
<a href=${c.o(this.href||"/")} class="pkt-link pkt-link--icon-left"
|
|
6
|
+
><pkt-icon
|
|
7
|
+
class="pkt-back-link__icon pkt-icon pkt-link__icon"
|
|
8
|
+
name="chevron-thin-left"
|
|
9
|
+
aria-hidden="true"
|
|
10
|
+
></pkt-icon
|
|
11
|
+
><span class="pkt-back-link__text">${this.text}</span></a
|
|
12
|
+
>
|
|
13
|
+
</nav>`}};n([r.n({type:String})],exports.PktBackLink.prototype,"href",2);n([r.n({type:String})],exports.PktBackLink.prototype,"text",2);n([r.n({type:String})],exports.PktBackLink.prototype,"ariaLabel",2);exports.PktBackLink=n([r.t("pkt-backlink")],exports.PktBackLink);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("./element-6DBpyGQm.cjs"),h=require("./pkt-slot-controller-BzddBp7z.cjs"),u=require("./class-map-BBG2gMX4.cjs"),a=require("./if-defined-Cni-RHLS.cjs"),d=require("./ref-iJtiv3o2.cjs");var c=Object.defineProperty,k=Object.getOwnPropertyDescriptor,e=(r,i,s,n)=>{for(var o=n>1?void 0:n?k(i,s):i,p=r.length-1,l;p>=0;p--)(l=r[p])&&(o=(n?l(i,s,o):l(o))||o);return n&&o&&c(i,s,o),o};window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/latest/animations/";exports.PktButton=class extends t.PktElement{constructor(){super(),this.defaultSlot=d.e(),this.iconName="user",this.secondIconName="user",this.mode="light",this.size="medium",this.skin="primary",this.variant="label-only",this.state="normal",this.type="button",this.form=void 0,this.isLoading=!1,this.disabled=!1,this.loadingAnimationPath=window.pktAnimationPath,this.slotController=new h.PktSlotController(this,this.defaultSlot)}connectedCallback(){super.connectedCallback(),this.addEventListener("click",i=>{(this.disabled||this.hasAttribute("disabled")||this.isLoading)&&(i.preventDefault(),i.stopImmediatePropagation())},!0),this.addEventListener("keydown",i=>{(this.disabled||this.hasAttribute("disabled")||this.isLoading)&&(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),i.stopImmediatePropagation())},!0)}attributeChangedCallback(i,s,n){super.attributeChangedCallback(i,s,n),i==="disabled"&&n==="false"&&(this.disabled=!1),(i==="isloading"||i==="isLoading")&&n==="false"&&(this.isLoading=!1)}firstUpdated(i){super.firstUpdated(i),this.disabled==="false"&&(this.disabled=!1),this.isLoading==="false"&&(this.isLoading=!1)}render(){const i=this.form??this.getAttribute("form")??void 0,s={"pkt-btn":!0,[`pkt-btn--${this.size}`]:!!this.size,[`pkt-btn--${this.skin}`]:!!this.skin,[`pkt-btn--${this.variant}`]:!!this.variant,[`pkt-btn--${this.color}`]:!!this.color,[`pkt-btn--${this.state}`]:!!this.state,"pkt-btn--disabled":!!this.disabled,"pkt-btn--isLoading":!!this.isLoading};return t.x`
|
|
1
|
+
"use strict";const t=require("./element-6DBpyGQm.cjs"),h=require("./pkt-slot-controller-BzddBp7z.cjs"),u=require("./class-map-BBG2gMX4.cjs"),a=require("./if-defined-Cni-RHLS.cjs"),d=require("./ref-iJtiv3o2.cjs");require("./icon-B_ryAy4Q.cjs");var c=Object.defineProperty,k=Object.getOwnPropertyDescriptor,e=(r,i,s,n)=>{for(var o=n>1?void 0:n?k(i,s):i,p=r.length-1,l;p>=0;p--)(l=r[p])&&(o=(n?l(i,s,o):l(o))||o);return n&&o&&c(i,s,o),o};window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/latest/animations/";exports.PktButton=class extends t.PktElement{constructor(){super(),this.defaultSlot=d.e(),this.iconName="user",this.secondIconName="user",this.mode="light",this.size="medium",this.skin="primary",this.variant="label-only",this.state="normal",this.type="button",this.form=void 0,this.isLoading=!1,this.disabled=!1,this.loadingAnimationPath=window.pktAnimationPath,this.slotController=new h.PktSlotController(this,this.defaultSlot)}connectedCallback(){super.connectedCallback(),this.addEventListener("click",i=>{(this.disabled||this.hasAttribute("disabled")||this.isLoading)&&(i.preventDefault(),i.stopImmediatePropagation())},!0),this.addEventListener("keydown",i=>{(this.disabled||this.hasAttribute("disabled")||this.isLoading)&&(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),i.stopImmediatePropagation())},!0)}attributeChangedCallback(i,s,n){super.attributeChangedCallback(i,s,n),i==="disabled"&&n==="false"&&(this.disabled=!1),(i==="isloading"||i==="isLoading")&&n==="false"&&(this.isLoading=!1)}firstUpdated(i){super.firstUpdated(i),this.disabled==="false"&&(this.disabled=!1),this.isLoading==="false"&&(this.isLoading=!1)}render(){const i=this.form??this.getAttribute("form")??void 0,s={"pkt-btn":!0,[`pkt-btn--${this.size}`]:!!this.size,[`pkt-btn--${this.skin}`]:!!this.skin,[`pkt-btn--${this.variant}`]:!!this.variant,[`pkt-btn--${this.color}`]:!!this.color,[`pkt-btn--${this.state}`]:!!this.state,"pkt-btn--disabled":!!this.disabled,"pkt-btn--isLoading":!!this.isLoading};return t.x`
|
|
2
2
|
<button
|
|
3
3
|
class=${u.e(s)}
|
|
4
4
|
type=${this.type}
|
|
@@ -3,6 +3,7 @@ import { P as m } from "./pkt-slot-controller-BPGj-LC5.js";
|
|
|
3
3
|
import { e as u } from "./class-map-BpTj9gtz.js";
|
|
4
4
|
import { o as l } from "./if-defined-CmuO4Vz9.js";
|
|
5
5
|
import { e as y, n as k } from "./ref-BBYSqgeW.js";
|
|
6
|
+
import "./icon-CC1js8eR.js";
|
|
6
7
|
var g = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, e = (t, o, n, r) => {
|
|
7
8
|
for (var a = r > 1 ? void 0 : r ? $(o, n) : o, d = t.length - 1, h; d >= 0; d--)
|
|
8
9
|
(h = t[d]) && (a = (r ? h(o, n, a) : h(a)) || a);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const o=require("./element-6DBpyGQm.cjs");require("./button-
|
|
1
|
+
"use strict";const o=require("./element-6DBpyGQm.cjs");require("./button-B8rdtaHB.cjs");require("./icon-B_ryAy4Q.cjs");const k={i18n:{nb:{contentPresentation:{title:"Oslo kommune bruker informasjonskapsler",description:["For at nettstedet skal fungere og være trygt, bruker Oslo kommune informasjonskapsler. Noen er teknisk nødvendige, mens andre sikrer ulik funksjonalitet.","Godtar du alle informasjonskapsler, tillater du også at vi samler inn data om statistikk og brukeradferd. Da hjelper du oss med å lage et bedre nettsted uten at du trenger å dele noe personlig informasjon med oss."],buttons:{accept:"Godta alle",reject:"Kun nødvendige",settings:"Innstillinger for informasjonskapsler"}},contentSettings:{title:"Innstillinger for informasjonskapsler",description:["Her kan du velge hvilke typer informasjonskapsler du vil tillate. Tillatelsen gjelder i 90 dager. Husk at nødvendige informasjonskapsler ikke kan velges bort.","Du kan når som helst endre innstillingene og finne mer informasjon nederst på nettstedet under «Innstillinger for informasjonskapsler» og «Personvern og informasjonskapsler»."],buttons:{back:"Tilbake",save:"Lagre innstillinger"}}},en:{contentPresentation:{title:"Before you visit Oslo kommune ...",description:["This website uses cookies to make improvements. In this context, we need your consent to measure the traffic on the website in relation to statistics and feedback.","To read more about what we use cookies for, go to our privacy declaration which you will find at the bottom of our websites."],buttons:{accept:"Yes, I accept",reject:"Only necessary",settings:"Go to settings"}},contentSettings:{title:"Her kan du aktivt velge mellom ulike informasjonskapsler",description:["For å lese mer om hva vi bruker informasjonskapsler til gå til vår personvernserklering som du finner på våre nettsider"],buttons:{back:"Back",save:"Save settings"}}}}};var d=Object.defineProperty,p=Object.getOwnPropertyDescriptor,s=(r,e,t,n)=>{for(var i=n>1?void 0:n?p(e,t):e,a=r.length-1,l;a>=0;a--)(l=r[a])&&(i=(n?l(e,t,i):l(i))||i);return n&&i&&d(e,t,i),i};let c=null;function u(){return c||(c=new Promise((r,e)=>{if(document.querySelector("#oslo-consent-script")){r();return}const t=document.createElement("script");t.src="https://cdn.web.oslo.kommune.no/cb/cb-v1.1.0.js",t.id="oslo-consent-script",t.onload=()=>r(),t.onerror=e,document.head.appendChild(t);const n=document.createElement("link");n.href="https://cdn.web.oslo.kommune.no/cb/cb-v1.1.0.css",n.type="text/css",n.rel="stylesheet",n.id="oslo-consent-styles",document.head.appendChild(n)}),c)}exports.PktConsent=class extends o.PktElement{constructor(){super(),this.devMode=!1,this.hotjarId=null,this.googleAnalyticsId=null,this.cookieDomain=null,this.cookieSecure=null,this.cookieExpiryDays=null,this.triggerType="button",this.triggerText=null,this.i18nLanguage="nb"}connectedCallback(){super.connectedCallback(),this.triggerText=this.triggerText||k.i18n[this.i18nLanguage].contentPresentation.buttons.settings}disconnectedCallback(){var e;super.disconnectedCallback(),this._cookieEventHandler&&((e=window.__cookieEvents)==null||e.off("CookieManager.setCookie",this._cookieEventHandler))}returnJsonOrObject(e){let t;try{t=JSON.parse(e)}catch{t=e}return t}emitCookieConsents(e){const n=this.returnJsonOrObject(e.value).items.reduce((i,a)=>(i[a.name]=a.consent,i),{});this.dispatchEvent(new CustomEvent("toggle-consent",{detail:n,bubbles:!0,cancelable:!1}))}async firstUpdated(e){window.cookieBanner_googleAnalyticsId=this.googleAnalyticsId,window.cookieBanner_hotjarId=this.hotjarId,this.cookieDomain&&(window.cookieBanner_cookieDomain=this.cookieDomain),this.cookieSecure&&(window.cookieBanner_cookieSecure=this.cookieSecure),this.cookieExpiryDays&&(window.cookieBanner_cookieExpiryDays=this.cookieExpiryDays),this.devMode&&(window.cookieBanner_devMode=this.devMode),await u(),this.triggerInit()}triggerInit(){window.document.dispatchEvent(new Event("CookieBannerReady",{bubbles:!0,cancelable:!0})),window.cookieBanner.cookieConsent.validateConsentCookie().then(e=>{if(e){const n={value:window.cookieBanner.cookieConsent.getConsentCookie()};window.setTimeout(()=>this.emitCookieConsents(n),0),this._cookieEventHandler&&window.__cookieEvents.off("CookieManager.setCookie",this._cookieEventHandler),this._cookieEventHandler=i=>{this.emitCookieConsents(i)},window.__cookieEvents.on("CookieManager.setCookie",this._cookieEventHandler)}})}openModal(e){var t;e.preventDefault(),(t=window.cookieBanner)!=null&&t.cookieConsent||this.triggerInit(),setTimeout(()=>window.cookieBanner.openCookieModal())}render(){return this.triggerType==="link"?o.x`<a href="#" class="pkt-link" @click=${this.openModal}>${this.triggerText}</a>`:this.triggerType==="footerlink"?o.x`<a href="#" class="pkt-footer__link" @click=${this.openModal}>
|
|
2
2
|
<pkt-icon name="chevron-right" class="pkt-footer__link-icon"></pkt-icon>
|
|
3
3
|
${this.triggerText}
|
|
4
4
|
</a>`:this.triggerType==="icon"?o.x`<pkt-button
|
package/dist/pkt-alert.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./alert-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./alert-DQNBDKjT.cjs"),t=e.PktAlert;Object.defineProperty(exports,"PktAlert",{enumerable:!0,get:()=>e.PktAlert});exports.default=t;
|
package/dist/pkt-alert.js
CHANGED
package/dist/pkt-backlink.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./backlink-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./backlink-JbBNi3qg.cjs"),t=e.PktBackLink;Object.defineProperty(exports,"PktBackLink",{enumerable:!0,get:()=>e.PktBackLink});exports.default=t;
|
package/dist/pkt-backlink.js
CHANGED
package/dist/pkt-button.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./button-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./button-B8rdtaHB.cjs"),e=t.PktButton;Object.defineProperty(exports,"PktButton",{enumerable:!0,get:()=>t.PktButton});exports.default=e;
|
package/dist/pkt-button.js
CHANGED
package/dist/pkt-consent.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./consent-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./consent-hYeFWNFr.cjs"),t=e.PktConsent;Object.defineProperty(exports,"PktConsent",{enumerable:!0,get:()=>e.PktConsent});exports.default=t;
|
package/dist/pkt-consent.js
CHANGED
package/dist/pkt-index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("./alert-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("./alert-DQNBDKjT.cjs"),l=require("./accordionitem-Csh7iSVG.cjs"),d=require("./backlink-JbBNi3qg.cjs"),b=require("./button-B8rdtaHB.cjs"),k=require("./calendar-BZe2D4Sr.cjs"),m=require("./card-uccD6Pnv.cjs"),g=require("./combobox-BhcqC30d.cjs"),h=require("./consent-hYeFWNFr.cjs"),f=require("./checkbox-wJ26voZd.cjs"),t=require("./element-6DBpyGQm.cjs"),y=require("./pkt-slot-controller-BzddBp7z.cjs"),s=require("./ref-iJtiv3o2.cjs"),O=require("./class-map-BBG2gMX4.cjs"),j=require("./datepicker-B9rhz_AF.cjs"),q=require("./helptext-CzQX6YVE.cjs"),x=require("./heading-BRE_iFtR.cjs"),C=require("./icon-B_ryAy4Q.cjs"),v=require("./input-wrapper-CZ-a00V7.cjs"),S=require("./link-Cjl0xwSq.cjs"),$=require("./linkcard-BlMhPNry.cjs"),L=require("./loader-CHPxY9c6.cjs"),_=require("./messagebox-CqUBJs_D.cjs"),A=require("./modal-CRtxhCaP.cjs"),B=require("./progressbar-DhMBXkww.cjs"),p=require("./radiobutton-CdT6v1oq.cjs"),T=require("./tag-Bbs0U_Au.cjs"),I=require("./textarea-CPXsMFUq.cjs"),M=require("./textinput-aNI5kibM.cjs"),R=require("./select-Dkl0KhGW.cjs");var H=Object.defineProperty,w=Object.getOwnPropertyDescriptor,o=(a,e,r,i)=>{for(var n=i>1?void 0:i?w(e,r):e,u=a.length-1,c;u>=0;u--)(c=a[u])&&(n=(i?c(e,r,n):c(n))||n);return i&&n&&H(e,r,n),n};exports.PktComponent=class extends t.PktElement{constructor(){super(),this.string="",this.strings=[],this.darkmode=!1,this._list=[],this.defaultSlot=s.e(),this.namedSlot=s.e(),this.slotController=new y.PktSlotController(this,this.defaultSlot,this.namedSlot)}connectedCallback(){this.strings.length&&this.strings.forEach(e=>{this._list.push(e.toUpperCase())}),super.connectedCallback()}render(){const e={"pkt-component":!0,"pkt-component--has-list":this.strings.length>0,"pkt-darkmode":this.darkmode};return t.x`
|
|
2
2
|
<div class="${O.e(e)}">
|
|
3
3
|
<h1 class="pkt-txt-28">${this.string}</h1>
|
|
4
4
|
|
package/dist/pkt-index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { P as A } from "./alert-
|
|
1
|
+
import { P as A } from "./alert-B07oUpkq.js";
|
|
2
2
|
import { P as B, a as E } from "./accordionitem-C9T3nlM0.js";
|
|
3
|
-
import { P as O } from "./backlink-
|
|
4
|
-
import { P as T } from "./button-
|
|
3
|
+
import { P as O } from "./backlink-C2jbzu0U.js";
|
|
4
|
+
import { P as T } from "./button-DhispFOY.js";
|
|
5
5
|
import { c as f } from "./calendar-DevQhOup.js";
|
|
6
6
|
import { P as D } from "./calendar-DevQhOup.js";
|
|
7
7
|
import { P as G } from "./card-BI1NZONj.js";
|
|
8
8
|
import { P as K } from "./combobox-D9dGKWuZ.js";
|
|
9
|
-
import { P as U } from "./consent-
|
|
9
|
+
import { P as U } from "./consent-BpcQFvbi.js";
|
|
10
10
|
import { P as q } from "./checkbox-CTRbpbye.js";
|
|
11
11
|
import { P as k, t as h, x as P, n, a as c } from "./element-CgEWt74-.js";
|
|
12
12
|
import { P as x } from "./pkt-slot-controller-BPGj-LC5.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-elements",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.4.1",
|
|
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",
|
|
@@ -18,21 +18,32 @@
|
|
|
18
18
|
"dev": "vite",
|
|
19
19
|
"build": "tsc && vite build",
|
|
20
20
|
"build-app": "tsc && vite build --config vite.config-app.ts",
|
|
21
|
-
"preview": "vite preview --outDir dist-app"
|
|
21
|
+
"preview": "vite preview --outDir dist-app",
|
|
22
|
+
"test": "jest --config jest.config.cjs"
|
|
22
23
|
},
|
|
23
24
|
"dependencies": {
|
|
24
25
|
"@date-fns/tz": "^1.2.0",
|
|
25
26
|
"@lit-labs/router": "^0.1.3",
|
|
27
|
+
"@types/jest": "^29.5.14",
|
|
28
|
+
"@types/node": "^20.17.30",
|
|
29
|
+
"@types/testing-library__jest-dom": "^5.14.9",
|
|
26
30
|
"date-fns": "^4.1.0",
|
|
27
31
|
"dialog-polyfill": "^0.5.6",
|
|
28
32
|
"lit": "^3.3.0",
|
|
29
33
|
"react-dom": ">=18.2.22",
|
|
30
|
-
"urlpattern-polyfill": "^10.0.0"
|
|
34
|
+
"urlpattern-polyfill": "^10.0.0",
|
|
35
|
+
"whatwg-fetch": "^3.6.19"
|
|
31
36
|
},
|
|
32
37
|
"devDependencies": {
|
|
38
|
+
"@babel/preset-env": "^7.28.3",
|
|
33
39
|
"@oslokommune/punkt-assets": "^13.3.1",
|
|
34
40
|
"@oslokommune/punkt-css": "^13.3.1",
|
|
41
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
42
|
+
"jest": "^29.7.0",
|
|
43
|
+
"jest-axe": "^9.0.0",
|
|
44
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
35
45
|
"sass": "^1.78.0",
|
|
46
|
+
"ts-jest": "^29.2.6",
|
|
36
47
|
"typescript": "^5.6.2",
|
|
37
48
|
"vite": "^5.4.18",
|
|
38
49
|
"vite-plugin-dts": "^4.2.1",
|
|
@@ -58,5 +69,5 @@
|
|
|
58
69
|
"url": "https://github.com/oslokommune/punkt/issues"
|
|
59
70
|
},
|
|
60
71
|
"license": "MIT",
|
|
61
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "5768a452bf48f03c7448b9706ad1cb2c06d3fdc4"
|
|
62
73
|
}
|