@oslokommune/punkt-react 13.14.0 → 13.15.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 CHANGED
@@ -5,6 +5,44 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
5
5
 
6
6
  ---
7
7
 
8
+ ## [13.15.1](https://github.com/oslokommune/punkt/compare/13.15.0...13.15.1) (2025-11-06)
9
+
10
+ ### ⚠ BREAKING CHANGES
11
+ Ingen
12
+
13
+ ### Features
14
+ Ingen
15
+
16
+ ### Bug Fixes
17
+ * Fjern ubrukt dependency react-element-to-jsx-string (#3109).
18
+
19
+
20
+ ### Chores
21
+ Ingen
22
+
23
+ ---
24
+
25
+
26
+ ## [13.15.0](https://github.com/oslokommune/punkt/compare/13.14.0...13.15.0) (2025-11-05)
27
+
28
+ ### ⚠ BREAKING CHANGES
29
+ Ingen
30
+
31
+ ### Features
32
+ * Reactifisert PktTag (#3108). * Reaktifisert Tag
33
+ * Litt penere tester
34
+ * Fikser type så den er bakoverkompatibel
35
+
36
+
37
+ ### Bug Fixes
38
+ Ingen
39
+
40
+ ### Chores
41
+ Ingen
42
+
43
+ ---
44
+
45
+
8
46
  ## [13.14.0](https://github.com/oslokommune/punkt/compare/13.13.2...13.14.0) (2025-11-04)
9
47
 
10
48
  ### ⚠ 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[];
@@ -505,15 +521,7 @@ declare interface IPktTabs {
505
521
  children?: ReactNode;
506
522
  }
507
523
 
508
- export declare interface IPktTag extends PktElType {
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: FC<IPktTag>;
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';