@oslokommune/punkt-react 13.13.2 → 13.15.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 +42 -0
- package/dist/index.d.ts +26 -12
- package/dist/punkt-react.es.js +1627 -1559
- package/dist/punkt-react.umd.js +131 -131
- package/package.json +2 -2
- package/src/components/link/Link.test.tsx +112 -0
- package/src/components/link/Link.tsx +35 -28
- package/src/components/tag/Tag.test.tsx +31 -17
- package/src/components/tag/Tag.tsx +108 -24
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,48 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [13.15.0](https://github.com/oslokommune/punkt/compare/13.14.0...13.15.0) (2025-11-05)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
* Reactifisert PktTag (#3108). * Reaktifisert Tag
|
|
15
|
+
* Litt penere tester
|
|
16
|
+
* Fikser type så den er bakoverkompatibel
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
Ingen
|
|
21
|
+
|
|
22
|
+
### Chores
|
|
23
|
+
Ingen
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## [13.14.0](https://github.com/oslokommune/punkt/compare/13.13.2...13.14.0) (2025-11-04)
|
|
29
|
+
|
|
30
|
+
### ⚠ BREAKING CHANGES
|
|
31
|
+
Ingen
|
|
32
|
+
|
|
33
|
+
### Features
|
|
34
|
+
* PktLink som React-komponent (#3107). * Reactifisering av PktLink
|
|
35
|
+
|
|
36
|
+
---------
|
|
37
|
+
|
|
38
|
+
Co-authored-by: Jan Schjetne <jan.schjetne@origo.oslo.kommune.no>
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### Bug Fixes
|
|
42
|
+
Ingen
|
|
43
|
+
|
|
44
|
+
### Chores
|
|
45
|
+
Ingen
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
|
|
8
50
|
## [13.13.2](https://github.com/oslokommune/punkt/compare/13.13.1...13.13.2) (2025-11-03)
|
|
9
51
|
|
|
10
52
|
### ⚠ BREAKING CHANGES
|
package/dist/index.d.ts
CHANGED
|
@@ -34,8 +34,24 @@ import { TAlertRole } from '../../types/aria';
|
|
|
34
34
|
import { TAriaLive } from '../../types/aria';
|
|
35
35
|
import { TextareaHTMLAttributes } from 'react';
|
|
36
36
|
|
|
37
|
+
declare interface BasePktTagProps {
|
|
38
|
+
skin?: 'blue' | 'blue-light' | 'blue-dark' | 'green' | 'red' | 'beige' | 'yellow' | 'grey' | 'gray';
|
|
39
|
+
textStyle?: 'normal-text' | 'thin-text';
|
|
40
|
+
size?: 'small' | 'medium' | 'large';
|
|
41
|
+
closeTag?: boolean;
|
|
42
|
+
iconName?: string;
|
|
43
|
+
ariaLabel?: string;
|
|
44
|
+
onClose?: () => void;
|
|
45
|
+
children?: ReactNode;
|
|
46
|
+
}
|
|
47
|
+
|
|
37
48
|
declare type Booleanish = boolean | 'true' | 'false';
|
|
38
49
|
|
|
50
|
+
declare interface ButtonPktTagProps extends BasePktTagProps, HTMLAttributes<HTMLButtonElement> {
|
|
51
|
+
closeTag: true;
|
|
52
|
+
type?: 'button' | 'submit' | 'reset';
|
|
53
|
+
}
|
|
54
|
+
|
|
39
55
|
declare interface Column {
|
|
40
56
|
title: string;
|
|
41
57
|
links?: Link[];
|
|
@@ -335,10 +351,10 @@ export declare interface IPktInputWrapper extends RefAttributes<HTMLElement> {
|
|
|
335
351
|
declare interface IPktLink extends LinkHTMLAttributes<HTMLAnchorElement> {
|
|
336
352
|
href?: string;
|
|
337
353
|
iconName?: string | undefined;
|
|
354
|
+
className?: string | undefined;
|
|
338
355
|
iconPosition?: string | undefined;
|
|
339
356
|
external?: boolean;
|
|
340
|
-
target?: string |
|
|
341
|
-
ref?: LegacyRef<HTMLAnchorElement>;
|
|
357
|
+
target?: string | undefined;
|
|
342
358
|
}
|
|
343
359
|
|
|
344
360
|
export declare interface IPktLinkCard extends Omit<HTMLAttributes<HTMLAnchorElement>, 'title'> {
|
|
@@ -505,15 +521,7 @@ declare interface IPktTabs {
|
|
|
505
521
|
children?: ReactNode;
|
|
506
522
|
}
|
|
507
523
|
|
|
508
|
-
export declare
|
|
509
|
-
skin?: 'blue' | 'blue-light' | 'blue-dark' | 'green' | 'red' | 'beige' | 'yellow' | 'grey' | 'gray';
|
|
510
|
-
textStyle?: 'normal-text' | 'thin-text';
|
|
511
|
-
size?: 'small' | 'medium' | 'large';
|
|
512
|
-
closeTag?: boolean;
|
|
513
|
-
iconName?: string;
|
|
514
|
-
ariaLabel?: string;
|
|
515
|
-
onClose?: (e: CustomEvent) => void;
|
|
516
|
-
}
|
|
524
|
+
export declare type IPktTag = ButtonPktTagProps | SpanPktTagProps;
|
|
517
525
|
|
|
518
526
|
export declare interface IPktTextarea extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
519
527
|
id: string;
|
|
@@ -758,7 +766,7 @@ export declare const PktTableRow: ({ className, children, ...props }: ITableRowP
|
|
|
758
766
|
|
|
759
767
|
export declare const PktTabs: ForwardRefExoticComponent<IPktTabs & RefAttributes<HTMLDivElement>>;
|
|
760
768
|
|
|
761
|
-
export declare const PktTag:
|
|
769
|
+
export declare const PktTag: ForwardRefExoticComponent<(ButtonPktTagProps | SpanPktTagProps) & RefAttributes<HTMLButtonElement | HTMLSpanElement>>;
|
|
762
770
|
|
|
763
771
|
export declare const PktTextarea: default_2.ForwardRefExoticComponent<IPktTextarea & default_2.RefAttributes<HTMLTextAreaElement>>;
|
|
764
772
|
|
|
@@ -784,6 +792,12 @@ declare interface SocialLink {
|
|
|
784
792
|
openInNewTab?: boolean;
|
|
785
793
|
}
|
|
786
794
|
|
|
795
|
+
declare interface SpanPktTagProps extends BasePktTagProps, HTMLAttributes<HTMLSpanElement> {
|
|
796
|
+
closeTag?: false | undefined;
|
|
797
|
+
onClose?: undefined;
|
|
798
|
+
type?: undefined;
|
|
799
|
+
}
|
|
800
|
+
|
|
787
801
|
declare type TCardImageShape = 'square' | 'round';
|
|
788
802
|
|
|
789
803
|
declare type TCardPadding = 'none' | 'default';
|