@oslokommune/punkt-react 12.37.8 → 12.38.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 +55 -0
- package/dist/index.d.ts +32 -10
- package/dist/punkt-react.es.js +6548 -6423
- package/dist/punkt-react.umd.js +392 -334
- package/package.json +4 -4
- package/src/components/card/Card.tsx +22 -6
- package/src/components/interfaces.ts +1 -0
- package/src/components/link/Link.tsx +16 -12
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,61 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [12.38.1](https://github.com/oslokommune/punkt/compare/12.38.0...12.38.1) (2025-05-14)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
Ingen
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
* Link click trigger to ganger, og button disabled funker ikke (#2545).
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Chores
|
|
21
|
+
Ingen
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## [12.38.0](https://github.com/oslokommune/punkt/compare/12.37.8...12.38.0) (2025-05-13)
|
|
27
|
+
|
|
28
|
+
### ⚠ BREAKING CHANGES
|
|
29
|
+
Ingen
|
|
30
|
+
|
|
31
|
+
### Features
|
|
32
|
+
* Refaktorering og forbedringer av kort – klikkbart lenkekort, runde bilder, tilgjengelighet, semantikk, fleksibilitet, styling (#2511). Lagt til støtte for:
|
|
33
|
+
- Tilgjenglig, klikkbart lenkekort
|
|
34
|
+
- Variabel tagposisjon
|
|
35
|
+
- Runde bilder
|
|
36
|
+
- Responsivitet
|
|
37
|
+
- Fokus på rammen av kortet
|
|
38
|
+
- Valgfri hover på rammen av kortet
|
|
39
|
+
- Variant uten padding
|
|
40
|
+
- Ny skin: outlined-beige
|
|
41
|
+
- forfatter
|
|
42
|
+
- dato
|
|
43
|
+
|
|
44
|
+
Annet:
|
|
45
|
+
- Bruker ny headingkomponent
|
|
46
|
+
- Støtte for valg av headingnivå
|
|
47
|
+
- Semantisk HTML med article, header, section og footer
|
|
48
|
+
- Fokusert på UU og lagt til aria-label og roller på ulike deler av kortet
|
|
49
|
+
- Kortet går nå fra landskap til portett på små skjermer
|
|
50
|
+
- Mange stylingendringer
|
|
51
|
+
- Håndterer nå at brukere ikke cropper bilder på forhånd slik at de ved ulike størrelser allikevel får uniforme størrelser på bildene i kortene
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
### Bug Fixes
|
|
55
|
+
Ingen
|
|
56
|
+
|
|
57
|
+
### Chores
|
|
58
|
+
Ingen
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
|
|
8
63
|
## [12.37.7](https://github.com/oslokommune/punkt/compare/12.37.6...12.37.7) (2025-05-13)
|
|
9
64
|
|
|
10
65
|
### ⚠ BREAKING CHANGES
|
package/dist/index.d.ts
CHANGED
|
@@ -15,11 +15,13 @@ import { IPktBackLink as IPktBackLink_2 } from '@oslokommune/punkt-elements';
|
|
|
15
15
|
import { IPktButton as IPktButton_2 } from '@oslokommune/punkt-elements';
|
|
16
16
|
import { IPktCombobox as IPktCombobox_2 } from '@oslokommune/punkt-elements';
|
|
17
17
|
import { IPktConsent as IPktConsent_2 } from '@oslokommune/punkt-elements';
|
|
18
|
+
import { IPktHeading } from '@oslokommune/punkt-elements';
|
|
18
19
|
import { IPktLoader as IPktLoader_2 } from '@oslokommune/punkt-elements';
|
|
19
20
|
import { IPktProgressbar as IPktProgressbar_2 } from '@oslokommune/punkt-elements';
|
|
20
21
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
21
22
|
import { KeyboardEventHandler } from 'react';
|
|
22
23
|
import { LegacyRef } from 'react';
|
|
24
|
+
import { LinkHTMLAttributes } from 'react';
|
|
23
25
|
import { MouseEventHandler } from 'react';
|
|
24
26
|
import { PktInputWrapper as PktInputWrapper_2 } from '@oslokommune/punkt-elements';
|
|
25
27
|
import * as React_2 from 'react';
|
|
@@ -119,18 +121,28 @@ export declare interface IPktButton extends ExtendedButton {
|
|
|
119
121
|
onKeyup?: KeyboardEventHandler<HTMLButtonElement>;
|
|
120
122
|
}
|
|
121
123
|
|
|
122
|
-
declare interface IPktCard extends PktElType {
|
|
123
|
-
|
|
124
|
-
|
|
124
|
+
export declare interface IPktCard extends PktElType {
|
|
125
|
+
ariaLabel?: string;
|
|
126
|
+
author?: string | null;
|
|
127
|
+
borderOnHover?: boolean | null;
|
|
128
|
+
date?: string | null;
|
|
129
|
+
direction?: TDirection;
|
|
125
130
|
heading?: string;
|
|
126
|
-
|
|
127
|
-
tags?: (Omit<IPktTag, 'closeTag'> & {
|
|
128
|
-
text: string;
|
|
129
|
-
})[] | string;
|
|
131
|
+
headingLevel?: IPktHeading['level'];
|
|
130
132
|
image?: {
|
|
131
133
|
src: string;
|
|
132
134
|
alt: string;
|
|
133
|
-
}
|
|
135
|
+
};
|
|
136
|
+
imageShape?: TCardImageShape;
|
|
137
|
+
clickCardLink?: string | null;
|
|
138
|
+
padding?: TCardPadding;
|
|
139
|
+
openLinkInNewTab?: boolean | null;
|
|
140
|
+
skin?: TCardSkin;
|
|
141
|
+
subheading?: string;
|
|
142
|
+
tagPosition?: TCardTagPosition;
|
|
143
|
+
tags?: (Omit<IPktTag, 'closeTag'> & {
|
|
144
|
+
text: string;
|
|
145
|
+
})[];
|
|
134
146
|
}
|
|
135
147
|
|
|
136
148
|
export declare interface IPktCheckbox extends InputHTMLAttributes<HTMLInputElement> {
|
|
@@ -293,13 +305,13 @@ export declare interface IPktInputWrapper extends Omit<PktElType, 'ref'> {
|
|
|
293
305
|
onToggleHelpText?: (e: CustomEvent) => void;
|
|
294
306
|
}
|
|
295
307
|
|
|
296
|
-
declare interface IPktLink extends
|
|
308
|
+
declare interface IPktLink extends LinkHTMLAttributes<HTMLAnchorElement> {
|
|
297
309
|
href?: string;
|
|
298
310
|
iconName?: string | undefined;
|
|
299
311
|
iconPosition?: string | undefined;
|
|
300
312
|
external?: boolean;
|
|
301
313
|
target?: string | null;
|
|
302
|
-
|
|
314
|
+
ref?: LegacyRef<HTMLAnchorElement>;
|
|
303
315
|
}
|
|
304
316
|
|
|
305
317
|
export declare interface IPktLinkCard extends PktElType {
|
|
@@ -742,6 +754,16 @@ declare interface SocialLink {
|
|
|
742
754
|
openInNewTab?: boolean;
|
|
743
755
|
}
|
|
744
756
|
|
|
757
|
+
declare type TCardImageShape = 'square' | 'round';
|
|
758
|
+
|
|
759
|
+
declare type TCardPadding = 'none' | 'standard';
|
|
760
|
+
|
|
761
|
+
declare type TCardSkin = 'outlined' | 'outlined-beige' | 'gray' | 'beige' | 'green' | 'blue';
|
|
762
|
+
|
|
763
|
+
declare type TCardTagPosition = 'top' | 'bottom';
|
|
764
|
+
|
|
765
|
+
declare type TDirection = 'portrait' | 'landscape';
|
|
766
|
+
|
|
745
767
|
declare type TSkin = 'blue' | 'green' | 'red' | 'beige' | 'yellow' | 'grey' | 'gray' | 'blue-light';
|
|
746
768
|
|
|
747
769
|
declare type TStepStatus = 'completed' | 'incomplete' | 'current';
|