@oslokommune/punkt-react 12.39.7 → 12.39.8

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 CHANGED
@@ -5,6 +5,24 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
5
5
 
6
6
  ---
7
7
 
8
+ ## [12.39.8](https://github.com/oslokommune/punkt/compare/12.39.7...12.39.8) (2025-05-19)
9
+
10
+ ### ⚠ BREAKING CHANGES
11
+ Ingen
12
+
13
+ ### Features
14
+ Ingen
15
+
16
+ ### Bug Fixes
17
+ * new, generic prop names for author and date (#2563).
18
+
19
+
20
+ ### Chores
21
+ Ingen
22
+
23
+ ---
24
+
25
+
8
26
  ## [12.39.7](https://github.com/oslokommune/punkt/compare/12.39.6...12.39.7) (2025-05-16)
9
27
 
10
28
  ### ⚠ BREAKING CHANGES
package/dist/index.d.ts CHANGED
@@ -123,9 +123,9 @@ export declare interface IPktButton extends ExtendedButton {
123
123
 
124
124
  export declare interface IPktCard extends PktElType {
125
125
  ariaLabel?: string;
126
- author?: string | null;
126
+ metaLead?: string | null;
127
127
  borderOnHover?: boolean | null;
128
- date?: string | null;
128
+ metaTrail?: string | null;
129
129
  direction?: TDirection;
130
130
  heading?: string;
131
131
  headingLevel?: IPktHeading['level'];
@@ -25211,7 +25211,7 @@ var FM = Object.defineProperty, $M = Object.getOwnPropertyDescriptor, ki = (r, n
25211
25211
  let ja = class extends Gr {
25212
25212
  //Constructor
25213
25213
  constructor() {
25214
- super(), this.defaultSlot = dn(), this.ariaLabel = "", this.author = null, this.borderOnHover = !0, this.clickCardLink = null, this.date = null, this.direction = GD.props.direction.default, this.heading = "", this.headinglevel = 3, this.image = {
25214
+ super(), this.defaultSlot = dn(), this.ariaLabel = "", this.metaLead = null, this.borderOnHover = !0, this.clickCardLink = null, this.metaTrail = null, this.direction = GD.props.direction.default, this.heading = "", this.headinglevel = 3, this.image = {
25215
25215
  src: "",
25216
25216
  alt: ""
25217
25217
  }, this.imageShape = "square", this.openLinkInNewTab = !1, this.padding = GD.props.padding.default, this.skin = GD.props.skin.default, this.subheading = "", this.tagPosition = "top", this.tags = [], this.slotController = new za(this, this.defaultSlot);
@@ -25242,7 +25242,7 @@ let ja = class extends Gr {
25242
25242
  ${this.renderHeader()}
25243
25243
  ${this.renderSlot()}
25244
25244
  ${this.tagPosition === "bottom" ? this.renderTags() : Ve}
25245
- ${this.renderCreditline()}
25245
+ ${this.renderMetadata()}
25246
25246
  </div>
25247
25247
  </article>
25248
25248
  `;
@@ -25349,12 +25349,12 @@ let ja = class extends Gr {
25349
25349
  ${this.defaultSlot && be`<section class="pkt-card__content" ${Kt(this.defaultSlot)}></section>`}
25350
25350
  `;
25351
25351
  }
25352
- renderCreditline() {
25352
+ renderMetadata() {
25353
25353
  return be`
25354
- ${this.author || this.date ? be`
25355
- <footer class="pkt-card__creditline">
25356
- ${this.author ? be`<span class="pkt-card__creditline-author">${this.author}</span>` : Ve}
25357
- ${this.date ? be`<span class="pkt-card__creditline-date">${this.date}</span>` : Ve}
25354
+ ${this.metaLead || this.metaTrail ? be`
25355
+ <footer class="pkt-card__metadata">
25356
+ ${this.metaLead ? be`<span class="pkt-card__metadata-lead">${this.metaLead}</span>` : Ve}
25357
+ ${this.metaTrail ? be`<span class="pkt-card__metadata-trail">${this.metaTrail}</span>` : Ve}
25358
25358
  </footer>
25359
25359
  ` : Ve}
25360
25360
  `;
@@ -25365,7 +25365,7 @@ ki([
25365
25365
  ], ja.prototype, "ariaLabel", 2);
25366
25366
  ki([
25367
25367
  z({ type: String })
25368
- ], ja.prototype, "author", 2);
25368
+ ], ja.prototype, "metaLead", 2);
25369
25369
  ki([
25370
25370
  z({ type: Boolean })
25371
25371
  ], ja.prototype, "borderOnHover", 2);
@@ -25374,7 +25374,7 @@ ki([
25374
25374
  ], ja.prototype, "clickCardLink", 2);
25375
25375
  ki([
25376
25376
  z({ type: String })
25377
- ], ja.prototype, "date", 2);
25377
+ ], ja.prototype, "metaTrail", 2);
25378
25378
  ki([
25379
25379
  z({ type: String })
25380
25380
  ], ja.prototype, "direction", 2);
@@ -549,7 +549,7 @@ You might need to use a local HTTP server (instead of file://): https://reactjs.
549
549
  ${this.iconName&&be`<pkt-icon class="pkt-tag__icon" name=${this.iconName}></pkt-icon>`}
550
550
  <span ${qt(this.defaultSlot)}></span>
551
551
  </span>
552
- `}};cu([z({type:Boolean,reflect:!0})],xs.prototype,"closeTag",2),cu([z({type:String,reflect:!0})],xs.prototype,"size",2),cu([z({type:String,reflect:!0})],xs.prototype,"skin",2),cu([z({type:String,reflect:!0})],xs.prototype,"textStyle",2),cu([z({type:String,reflect:!0})],xs.prototype,"iconName",2),cu([z({type:String})],xs.prototype,"type",2),cu([z({type:String})],xs.prototype,"ariaLabel",2),cu([$n()],xs.prototype,"_isClosed",2),cu([$n()],xs.prototype,"_ariaDescription",2),xs=cu([dr("pkt-tag")],xs);const f3={skin:{default:"outlined"},direction:{default:"portrait"},padding:{default:"standard"}},p0={props:f3};var p3=Object.defineProperty,h3=Object.getOwnPropertyDescriptor,ri=(n,r,i,l)=>{for(var c=l>1?void 0:l?h3(r,i):r,h=n.length-1,m;h>=0;h--)(m=n[h])&&(c=(l?m(r,i,c):m(c))||c);return l&&c&&p3(r,i,c),c};let xa=class extends Hr{constructor(){super(),this.defaultSlot=dn(),this.ariaLabel="",this.author=null,this.borderOnHover=!0,this.clickCardLink=null,this.date=null,this.direction=p0.props.direction.default,this.heading="",this.headinglevel=3,this.image={src:"",alt:""},this.imageShape="square",this.openLinkInNewTab=!1,this.padding=p0.props.padding.default,this.skin=p0.props.skin.default,this.subheading="",this.tagPosition="top",this.tags=[],this.slotController=new _a(this,this.defaultSlot)}connectedCallback(){super.connectedCallback()}render(){var r,i;const l={"pkt-card":!0,[`pkt-card--${this.skin}`]:this.skin,[`pkt-card--${this.direction}`]:this.direction,[`pkt-card--padding-${this.padding}`]:this.padding,"pkt-card--border-on-hover":this.borderOnHover},c=((r=this.ariaLabel)==null?void 0:r.trim())||(this.heading?`${this.heading} lenkekort`:"lenkekort"),h=((i=this.ariaLabel)==null?void 0:i.trim())||(this.heading?this.heading:"kort");return be`
552
+ `}};cu([z({type:Boolean,reflect:!0})],xs.prototype,"closeTag",2),cu([z({type:String,reflect:!0})],xs.prototype,"size",2),cu([z({type:String,reflect:!0})],xs.prototype,"skin",2),cu([z({type:String,reflect:!0})],xs.prototype,"textStyle",2),cu([z({type:String,reflect:!0})],xs.prototype,"iconName",2),cu([z({type:String})],xs.prototype,"type",2),cu([z({type:String})],xs.prototype,"ariaLabel",2),cu([$n()],xs.prototype,"_isClosed",2),cu([$n()],xs.prototype,"_ariaDescription",2),xs=cu([dr("pkt-tag")],xs);const f3={skin:{default:"outlined"},direction:{default:"portrait"},padding:{default:"standard"}},p0={props:f3};var p3=Object.defineProperty,h3=Object.getOwnPropertyDescriptor,ri=(n,r,i,l)=>{for(var c=l>1?void 0:l?h3(r,i):r,h=n.length-1,m;h>=0;h--)(m=n[h])&&(c=(l?m(r,i,c):m(c))||c);return l&&c&&p3(r,i,c),c};let xa=class extends Hr{constructor(){super(),this.defaultSlot=dn(),this.ariaLabel="",this.metaLead=null,this.borderOnHover=!0,this.clickCardLink=null,this.metaTrail=null,this.direction=p0.props.direction.default,this.heading="",this.headinglevel=3,this.image={src:"",alt:""},this.imageShape="square",this.openLinkInNewTab=!1,this.padding=p0.props.padding.default,this.skin=p0.props.skin.default,this.subheading="",this.tagPosition="top",this.tags=[],this.slotController=new _a(this,this.defaultSlot)}connectedCallback(){super.connectedCallback()}render(){var r,i;const l={"pkt-card":!0,[`pkt-card--${this.skin}`]:this.skin,[`pkt-card--${this.direction}`]:this.direction,[`pkt-card--padding-${this.padding}`]:this.padding,"pkt-card--border-on-hover":this.borderOnHover},c=((r=this.ariaLabel)==null?void 0:r.trim())||(this.heading?`${this.heading} lenkekort`:"lenkekort"),h=((i=this.ariaLabel)==null?void 0:i.trim())||(this.heading?this.heading:"kort");return be`
553
553
  <article
554
554
  class=${It(l)}
555
555
  aria-label=${Cn(this.clickCardLink?c:h)}
@@ -560,7 +560,7 @@ You might need to use a local HTTP server (instead of file://): https://reactjs.
560
560
  ${this.renderHeader()}
561
561
  ${this.renderSlot()}
562
562
  ${this.tagPosition==="bottom"?this.renderTags():qe}
563
- ${this.renderCreditline()}
563
+ ${this.renderMetadata()}
564
564
  </div>
565
565
  </article>
566
566
  `}renderImage(){const r={"pkt-card__image":!0,[`pkt-card__image-${this.imageShape}`]:this.imageShape};return be`
@@ -628,14 +628,14 @@ You might need to use a local HTTP server (instead of file://): https://reactjs.
628
628
  `:qe}
629
629
  `}renderSlot(){return be`
630
630
  ${this.defaultSlot&&be`<section class="pkt-card__content" ${qt(this.defaultSlot)}></section>`}
631
- `}renderCreditline(){return be`
632
- ${this.author||this.date?be`
633
- <footer class="pkt-card__creditline">
634
- ${this.author?be`<span class="pkt-card__creditline-author">${this.author}</span>`:qe}
635
- ${this.date?be`<span class="pkt-card__creditline-date">${this.date}</span>`:qe}
631
+ `}renderMetadata(){return be`
632
+ ${this.metaLead||this.metaTrail?be`
633
+ <footer class="pkt-card__metadata">
634
+ ${this.metaLead?be`<span class="pkt-card__metadata-lead">${this.metaLead}</span>`:qe}
635
+ ${this.metaTrail?be`<span class="pkt-card__metadata-trail">${this.metaTrail}</span>`:qe}
636
636
  </footer>
637
637
  `:qe}
638
- `}};ri([z({type:String})],xa.prototype,"ariaLabel",2),ri([z({type:String})],xa.prototype,"author",2),ri([z({type:Boolean})],xa.prototype,"borderOnHover",2),ri([z({type:String,reflect:!0})],xa.prototype,"clickCardLink",2),ri([z({type:String})],xa.prototype,"date",2),ri([z({type:String})],xa.prototype,"direction",2),ri([z({type:String})],xa.prototype,"heading",2),ri([z({type:Number})],xa.prototype,"headinglevel",2),ri([z({type:Object})],xa.prototype,"image",2),ri([z({type:String})],xa.prototype,"imageShape",2),ri([z({type:Boolean})],xa.prototype,"openLinkInNewTab",2),ri([z({type:String})],xa.prototype,"padding",2),ri([z({type:String})],xa.prototype,"skin",2),ri([z({type:String})],xa.prototype,"subheading",2),ri([z({type:String})],xa.prototype,"tagPosition",2),ri([z({type:Array})],xa.prototype,"tags",2),xa=ri([dr("pkt-card")],xa);/**
638
+ `}};ri([z({type:String})],xa.prototype,"ariaLabel",2),ri([z({type:String})],xa.prototype,"metaLead",2),ri([z({type:Boolean})],xa.prototype,"borderOnHover",2),ri([z({type:String,reflect:!0})],xa.prototype,"clickCardLink",2),ri([z({type:String})],xa.prototype,"metaTrail",2),ri([z({type:String})],xa.prototype,"direction",2),ri([z({type:String})],xa.prototype,"heading",2),ri([z({type:Number})],xa.prototype,"headinglevel",2),ri([z({type:Object})],xa.prototype,"image",2),ri([z({type:String})],xa.prototype,"imageShape",2),ri([z({type:Boolean})],xa.prototype,"openLinkInNewTab",2),ri([z({type:String})],xa.prototype,"padding",2),ri([z({type:String})],xa.prototype,"skin",2),ri([z({type:String})],xa.prototype,"subheading",2),ri([z({type:String})],xa.prototype,"tagPosition",2),ri([z({type:Array})],xa.prototype,"tags",2),xa=ri([dr("pkt-card")],xa);/**
639
639
  * @license
640
640
  * Copyright 2017 Google LLC
641
641
  * SPDX-License-Identifier: BSD-3-Clause
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oslokommune/punkt-react",
3
- "version": "12.39.7",
3
+ "version": "12.39.8",
4
4
  "description": "React komponentbibliotek til Punkt, et designsystem laget av Oslo Origo",
5
5
  "homepage": "https://punkt.oslo.kommune.no",
6
6
  "author": "Team Designsystem, Oslo Origo",
@@ -38,7 +38,7 @@
38
38
  "dependencies": {
39
39
  "@lit-labs/ssr-dom-shim": "^1.2.1",
40
40
  "@lit/react": "^1.0.7",
41
- "@oslokommune/punkt-elements": "^12.39.7",
41
+ "@oslokommune/punkt-elements": "^12.39.8",
42
42
  "angular-html-parser": "^6.0.2",
43
43
  "html-format": "^1.1.7",
44
44
  "prettier": "^3.3.3",
@@ -49,7 +49,7 @@
49
49
  "devDependencies": {
50
50
  "@babel/plugin-proposal-private-property-in-object": "^7.18.6",
51
51
  "@oslokommune/punkt-assets": "^12.39.2",
52
- "@oslokommune/punkt-css": "^12.39.7",
52
+ "@oslokommune/punkt-css": "^12.39.8",
53
53
  "@testing-library/jest-dom": "^6.5.0",
54
54
  "@testing-library/react": "^16.0.1",
55
55
  "@testing-library/user-event": "^14.5.2",
@@ -112,5 +112,5 @@
112
112
  "url": "https://github.com/oslokommune/punkt/issues"
113
113
  },
114
114
  "license": "MIT",
115
- "gitHead": "504099164121e630280de133dfc4accf97765a8f"
115
+ "gitHead": "9837c1edd0b49ecdc14a46ede9442d30bdb9d908"
116
116
  }
@@ -14,9 +14,9 @@ type TCardTagPosition = 'top' | 'bottom'
14
14
 
15
15
  export interface IPktCard extends PktElType {
16
16
  ariaLabel?: string
17
- author?: string | null
17
+ metaLead?: string | null
18
18
  borderOnHover?: boolean | null
19
- date?: string | null
19
+ metaTrail?: string | null
20
20
  direction?: TDirection
21
21
  heading?: string
22
22
  headingLevel?: IPktHeading['level']