@oslokommune/punkt-react 12.40.1 → 12.40.3
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 +21 -0
- package/dist/index.d.ts +3 -3
- package/dist/punkt-react.es.js +7 -7
- package/dist/punkt-react.umd.js +2 -2
- package/package.json +4 -4
- package/src/components/card/Card.tsx +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,27 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [12.40.3](https://github.com/oslokommune/punkt/compare/12.40.2...12.40.3) (2025-05-20)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
Ingen
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
Ingen
|
|
18
|
+
|
|
19
|
+
### Chores
|
|
20
|
+
* update propnames for cards (#2574). - direction til layout
|
|
21
|
+
- portrait til vertical
|
|
22
|
+
- landscape til horizontal
|
|
23
|
+
- padding: standard til padding: default
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
|
|
8
29
|
## [12.40.1](https://github.com/oslokommune/punkt/compare/12.40.0...12.40.1) (2025-05-20)
|
|
9
30
|
|
|
10
31
|
### ⚠ BREAKING CHANGES
|
package/dist/index.d.ts
CHANGED
|
@@ -126,7 +126,7 @@ export declare interface IPktCard extends PktElType {
|
|
|
126
126
|
metaLead?: string | null;
|
|
127
127
|
borderOnHover?: boolean | null;
|
|
128
128
|
metaTrail?: string | null;
|
|
129
|
-
|
|
129
|
+
layout?: TLayout;
|
|
130
130
|
heading?: string;
|
|
131
131
|
headingLevel?: IPktHeading['level'];
|
|
132
132
|
image?: {
|
|
@@ -759,13 +759,13 @@ declare interface SocialLink {
|
|
|
759
759
|
|
|
760
760
|
declare type TCardImageShape = 'square' | 'round';
|
|
761
761
|
|
|
762
|
-
declare type TCardPadding = 'none' | '
|
|
762
|
+
declare type TCardPadding = 'none' | 'default';
|
|
763
763
|
|
|
764
764
|
declare type TCardSkin = 'outlined' | 'outlined-beige' | 'gray' | 'beige' | 'green' | 'blue';
|
|
765
765
|
|
|
766
766
|
declare type TCardTagPosition = 'top' | 'bottom';
|
|
767
767
|
|
|
768
|
-
declare type
|
|
768
|
+
declare type TLayout = 'vertical' | 'horizontal';
|
|
769
769
|
|
|
770
770
|
declare type TSkin = 'blue' | 'green' | 'red' | 'beige' | 'yellow' | 'grey' | 'gray' | 'blue-light';
|
|
771
771
|
|
package/dist/punkt-react.es.js
CHANGED
|
@@ -25191,14 +25191,14 @@ al = ic([
|
|
|
25191
25191
|
cr("pkt-tag")
|
|
25192
25192
|
], al);
|
|
25193
25193
|
const AI = {
|
|
25194
|
+
layout: {
|
|
25195
|
+
default: "vertical"
|
|
25196
|
+
},
|
|
25194
25197
|
skin: {
|
|
25195
25198
|
default: "outlined"
|
|
25196
25199
|
},
|
|
25197
|
-
direction: {
|
|
25198
|
-
default: "portrait"
|
|
25199
|
-
},
|
|
25200
25200
|
padding: {
|
|
25201
|
-
default: "
|
|
25201
|
+
default: "default"
|
|
25202
25202
|
}
|
|
25203
25203
|
}, GD = {
|
|
25204
25204
|
props: AI
|
|
@@ -25211,7 +25211,7 @@ var FI = Object.defineProperty, $I = Object.getOwnPropertyDescriptor, ki = (n, r
|
|
|
25211
25211
|
let ja = class extends Gr {
|
|
25212
25212
|
//Constructor
|
|
25213
25213
|
constructor() {
|
|
25214
|
-
super(), this.defaultSlot = dn(), this.ariaLabel = "", this.metaLead = null, this.borderOnHover = !0, this.clickCardLink = null, this.metaTrail = null, this.
|
|
25214
|
+
super(), this.defaultSlot = dn(), this.ariaLabel = "", this.metaLead = null, this.borderOnHover = !0, this.clickCardLink = null, this.metaTrail = null, this.layout = GD.props.layout.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);
|
|
@@ -25227,7 +25227,7 @@ let ja = class extends Gr {
|
|
|
25227
25227
|
const l = {
|
|
25228
25228
|
"pkt-card": !0,
|
|
25229
25229
|
[`pkt-card--${this.skin}`]: this.skin,
|
|
25230
|
-
[`pkt-card--${this.
|
|
25230
|
+
[`pkt-card--${this.layout}`]: this.layout,
|
|
25231
25231
|
[`pkt-card--padding-${this.padding}`]: this.padding,
|
|
25232
25232
|
"pkt-card--border-on-hover": this.borderOnHover
|
|
25233
25233
|
}, 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");
|
|
@@ -25377,7 +25377,7 @@ ki([
|
|
|
25377
25377
|
], ja.prototype, "metaTrail", 2);
|
|
25378
25378
|
ki([
|
|
25379
25379
|
z({ type: String })
|
|
25380
|
-
], ja.prototype, "
|
|
25380
|
+
], ja.prototype, "layout", 2);
|
|
25381
25381
|
ki([
|
|
25382
25382
|
z({ type: String })
|
|
25383
25383
|
], ja.prototype, "heading", 2);
|
package/dist/punkt-react.umd.js
CHANGED
|
@@ -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})],_s.prototype,"closeTag",2),cu([z({type:String,reflect:!0})],_s.prototype,"size",2),cu([z({type:String,reflect:!0})],_s.prototype,"skin",2),cu([z({type:String,reflect:!0})],_s.prototype,"textStyle",2),cu([z({type:String,reflect:!0})],_s.prototype,"iconName",2),cu([z({type:String})],_s.prototype,"type",2),cu([z({type:String})],_s.prototype,"ariaLabel",2),cu([$n()],_s.prototype,"_isClosed",2),cu([$n()],_s.prototype,"_ariaDescription",2),_s=cu([dr("pkt-tag")],_s);const f3={
|
|
552
|
+
`}};cu([z({type:Boolean,reflect:!0})],_s.prototype,"closeTag",2),cu([z({type:String,reflect:!0})],_s.prototype,"size",2),cu([z({type:String,reflect:!0})],_s.prototype,"skin",2),cu([z({type:String,reflect:!0})],_s.prototype,"textStyle",2),cu([z({type:String,reflect:!0})],_s.prototype,"iconName",2),cu([z({type:String})],_s.prototype,"type",2),cu([z({type:String})],_s.prototype,"ariaLabel",2),cu([$n()],_s.prototype,"_isClosed",2),cu([$n()],_s.prototype,"_ariaDescription",2),_s=cu([dr("pkt-tag")],_s);const f3={layout:{default:"vertical"},skin:{default:"outlined"},padding:{default:"default"}},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 _a=class extends Hr{constructor(){super(),this.defaultSlot=dn(),this.ariaLabel="",this.metaLead=null,this.borderOnHover=!0,this.clickCardLink=null,this.metaTrail=null,this.layout=p0.props.layout.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 xa(this,this.defaultSlot)}connectedCallback(){super.connectedCallback()}render(){var r,i;const l={"pkt-card":!0,[`pkt-card--${this.skin}`]:this.skin,[`pkt-card--${this.layout}`]:this.layout,[`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)}
|
|
@@ -635,7 +635,7 @@ You might need to use a local HTTP server (instead of file://): https://reactjs.
|
|
|
635
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})],_a.prototype,"ariaLabel",2),ri([z({type:String})],_a.prototype,"metaLead",2),ri([z({type:Boolean})],_a.prototype,"borderOnHover",2),ri([z({type:String,reflect:!0})],_a.prototype,"clickCardLink",2),ri([z({type:String})],_a.prototype,"metaTrail",2),ri([z({type:String})],_a.prototype,"
|
|
638
|
+
`}};ri([z({type:String})],_a.prototype,"ariaLabel",2),ri([z({type:String})],_a.prototype,"metaLead",2),ri([z({type:Boolean})],_a.prototype,"borderOnHover",2),ri([z({type:String,reflect:!0})],_a.prototype,"clickCardLink",2),ri([z({type:String})],_a.prototype,"metaTrail",2),ri([z({type:String})],_a.prototype,"layout",2),ri([z({type:String})],_a.prototype,"heading",2),ri([z({type:Number})],_a.prototype,"headinglevel",2),ri([z({type:Object})],_a.prototype,"image",2),ri([z({type:String})],_a.prototype,"imageShape",2),ri([z({type:Boolean})],_a.prototype,"openLinkInNewTab",2),ri([z({type:String})],_a.prototype,"padding",2),ri([z({type:String})],_a.prototype,"skin",2),ri([z({type:String})],_a.prototype,"subheading",2),ri([z({type:String})],_a.prototype,"tagPosition",2),ri([z({type:Array})],_a.prototype,"tags",2),_a=ri([dr("pkt-card")],_a);/**
|
|
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.40.
|
|
3
|
+
"version": "12.40.3",
|
|
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.40.
|
|
41
|
+
"@oslokommune/punkt-elements": "^12.40.3",
|
|
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.40.
|
|
52
|
+
"@oslokommune/punkt-css": "^12.40.3",
|
|
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": "
|
|
115
|
+
"gitHead": "ed16d8e18201f36c905e47b96d62d29278595ba8"
|
|
116
116
|
}
|
|
@@ -7,8 +7,8 @@ import type { PktElType, PktElConstructor } from '@/interfaces/IPktElements'
|
|
|
7
7
|
import { IPktTag } from '../tag/Tag'
|
|
8
8
|
|
|
9
9
|
type TCardSkin = 'outlined' | 'outlined-beige' | 'gray' | 'beige' | 'green' | 'blue'
|
|
10
|
-
type
|
|
11
|
-
type TCardPadding = 'none' | '
|
|
10
|
+
type TLayout = 'vertical' | 'horizontal'
|
|
11
|
+
type TCardPadding = 'none' | 'default'
|
|
12
12
|
type TCardImageShape = 'square' | 'round'
|
|
13
13
|
type TCardTagPosition = 'top' | 'bottom'
|
|
14
14
|
|
|
@@ -17,7 +17,7 @@ export interface IPktCard extends PktElType {
|
|
|
17
17
|
metaLead?: string | null
|
|
18
18
|
borderOnHover?: boolean | null
|
|
19
19
|
metaTrail?: string | null
|
|
20
|
-
|
|
20
|
+
layout?: TLayout
|
|
21
21
|
heading?: string
|
|
22
22
|
headingLevel?: IPktHeading['level']
|
|
23
23
|
image?: { src: string; alt: string }
|