@oslokommune/punkt-react 13.14.0 → 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 CHANGED
@@ -5,6 +5,26 @@ 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
+
8
28
  ## [13.14.0](https://github.com/oslokommune/punkt/compare/13.13.2...13.14.0) (2025-11-04)
9
29
 
10
30
  ### ⚠ 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';